[Sort of ot]: Perl Fork and Exec...
Cliff
cliffo at u.washington.edu
Fri Jan 10 16:49:16 PST 2003
I'm not sure if this is any help as IANAE, but...would using open() and
close() avoid the issue of forking a new shell thus allowing you to kill
the child process you really want?
This snippet loads a simple utility to convert the formatting of text files.
$pid = fork();
if ($pid == 0)
{
$fileconverter = "/usr/local/bin/strp -u";
# Convert the inputfile to unix text vs. mac or windows text format
open(FCONV,"$fileconverter $fulldir/$inputfile|");
close(FCONV);
}
Cliff
Ethan Merritt wrote:
>On Friday 10 January 2003 15:49, Scholz Matthew wrote:
>
>
>> it's wierd, confusing, and
>>extremely aggravating. It also has nothing really to
>>do with linux. It's purely a perl problem, or so it
>>appears. *sigh*
>>
>>
>
>Not even that. It's a shell problem. You are sending a
>signal to the shell created by exec(), and what happens
>to child processes of that shell varies with the shell
>configuration. For csh see hup/nohup.
>For bash I can't help (I never did figure out signal
>handling in bash).
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman1.u.washington.edu/pipermail/linux/attachments/20030110/e1349a65/attachment.htm
More information about the Linux
mailing list