develooper Front page | perl.beginners | Postings from April 2002

Problem with system provided utilities

From:
sharan
Date:
April 27, 2002 02:08
Subject:
Problem with system provided utilities
Message ID:
20020427070636.18699.qmail@onion.perl.org
Hello,

I have 2 problems with system utility.

1. If a process is started by system, then, when a process is killed, child
process still remains.
2. When output of the process is redirected to a file, file does not get
updated util process dies.

This problem is there on Linux and windows as well.

Can any body help me please?

Ex:-
1. when (perl a.pl - see a.pl below) is killed, tcpdump process, started by
a.pl still remains.
2. until (perl b.pl and tcpdump - see b.pl below) is killed, output file is
not updated.


a.pl
-----
#!/usr/bin/perl

system("tcpdump -i");

# ends;

b.pl
-----
#! /usr/bin/perl
system("tcpdump -i > output");

#ends;





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About