Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: fork() and wait() Message-ID: <7104@jpl-devvax.JPL.NASA.GOV> Date: 18 Feb 90 00:31:27 GMT References: <2641@uvaarpa.virginia.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 28 In article <2641@uvaarpa.virginia.edu> kayvan@mrspoc.transact.com writes: : Looking at eval.c, it seems that the perl's wait() ignores certain : signals. I don't think this is correct behavior. You're probably right. : I have an application where I want to spawn a subprocess (which : setpgrp()'s and goes about its merry way) and at the same time I want : the parent to wait() for the child to finish. Now, if I want to : interrupt the parent, I should be able to (without killing the child, : so system() will not do). It would probably be possible even now by calling wait thru syscall(). : Is there anything wrong with commenting out the signal(SIGINT, SIG_IGN) : and the other SIG_IGN line in the O_WAIT case in eval.c?? I'll do that in patch 9 and see if anyone screams. : Why are they there in the first place? Because the code was copied in from the mypopen routine. But that's a higher level routine, and most system()ish routines behave like that. But wait should be a low level operator. You can always ignore the signals yourself around a wait if you like, but if the wait ignores them then you can't unignore them. >>patch9 Larry