force coredump from child created by subprocess

David Sveningsson ext at sidvind.com
Tue Oct 5 08:15:45 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I am running a process using subprocess and detect if the process
crashes using .returncode. I would like to force coredumps being created
regardless of the system settings, eg run "ulimit -c unlimited" in the
childprocess.

I've had no luck using preexec_fn and os.system, it just made no
difference. I could probably add a thin wrapper script but I'm not very
fond of that idea.

Is there some easy way to force the childprocess to create a coredump if
it crashes?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyrFvEACgkQ6pa1H/H5pqVwDwCfRKDV+zCrnZUZSVN8eEYsMkFU
/UQAoNpjlM2l5jKViiqzSbRX6wZPDy6H
=7GDQ
-----END PGP SIGNATURE-----



More information about the Python-list mailing list