[Athens-pm] In which shell does a system call run
Angelos Karageorgiou
angelos at unix.gr
Thu Dec 22 09:24:30 PST 2005
system always calls a shell and passes parameters to it
cat test.pl
system ("ps -fax | less");
($name,$aliases,$addrtype,$length, at addrs) =
gethostbyname("smtp.myqnet.gr");
foreach $addr (@addrs) {
($a,$b,$c,$d) = unpack('C4',$addr);
print "$a.$b.$c.$d\n";
}
output
11010 pts/11 Ss 0:00 \_ -bash
11034 pts/11 S+ 0:00 \_ perl test.pl
11035 pts/11 S+ 0:00 \_ sh -c ps -fax | less
11036 pts/11 R+ 0:00 \_ ps -fax
11037 pts/11 R+ 0:00 \_ less
--
Angelos Karageorgiou
Internet VOIP e-Services Unix Guru
Masters of Computer Science C.U.N.Y.
Tel: +30 210 7713372
Fax: +30 210 7713709
Mob: +30 697 724 7446
Web: http://www.unix.gr
On Thu, 22 Dec 2005, athens-pm-owner at pm.org wrote:
> You are not allowed to post to this mailing list, and your message has
> been automatically rejected. If you think that your messages are
> being rejected in error, contact the mailing list owner at
> athens-pm-owner at pm.org.
>
>
More information about the Athens-pm
mailing list