Revision: 697
http://assorted.svn.sourceforge.net/assorted/?rev=697&view=rev
Author: yangzhang
Date: 2008-05-04 00:27:22 -0700 (Sun, 04 May 2008)
Log Message:
-----------
added subprocess
Added Paths:
-----------
sandbox/trunk/src/c/subprocs.c
Added: sandbox/trunk/src/c/subprocs.c
===================================================================
--- sandbox/trunk/src/c/subprocs.c (rev 0)
+++ sandbox/trunk/src/c/subprocs.c 2008-05-04 07:27:22 UTC (rev 697)
@@ -0,0 +1,14 @@
+// Performing ctrl-c from the shell actually sends a sigint to the entire
+// process group, i.e. the top process plus any subprocesses. You can get the
+// same effect by running this command as a background shell job and killing
+// the job with `kill %%` or `kill %+`.
+
+#include <unistd.h>
+
+int
+main()
+{
+ pid_t pid = fork();
+ sleep(30);
+ return 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|