Please explain the magic in os.erl

Raimo Niskanen raimo@REDACTED
Fri Sep 10 16:22:59 CEST 2004


david.wallin@REDACTED (David Wallin) writes:

I guess it is just to easier identify hanging or slow shell commands
in a ps -ef listing. It just sets the first argument for the shell
to "unix:cmd".

Try:
        1> os:cmd("echo $1").
        "unix:cmd\n"

> Hi all,
> 
> I had a look at os.erl and found this (line 173):
> 
> -define(SHELL, "sh -s unix:cmd 2>&1").
> 
> Could someone explain the 'unix:cmd' part ?
> 
> 
> cheers,
> 
> --david.
> 

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list