[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[LI] RE: script timer



      Hi Binand, 

      1. I tried to run a program, using execl("command", "command", '\0').
         This program runs when the command is in . (curr. dir.). Else, you
         need to get the correct syntax execl("/path/command", "command",
'\0')
         to run the program. Whereas, system("command") will search the
         entire PATH, unless you give system("/path/command"). But, of
         course, system() call with suid/ sgid set, is not recommended.

      2. I intentionally killed the called program from the program itself,
giving
         sig 9, and the program when run thru. execl() gave,
         **Killed** (obviously !!)
         whereas, when called thru' system() it gave,
         **Operation not permitted**
         The return value was 9, the signal thru' which it was killed.

      3. And of course, with a badly written program both execl() and
system()
          gave me a /tmp/sh#, when the calling program had setuid()/
setgid()
          bit set. But it is tough to write execl() badly. ;-)

      4. Well, at least we should not be using system() for clearing
screens.
          A better option is using ^[2J. OK, I am going to nuke that call.

       Suvendra

> -----Original Message-----
> From:	Binand Raj S. [SMTP:binand@xxxxxxxxxxxxxxxxxxxxx]
> Sent:	Thursday, August 12, 1999 11:39 AM
> To:	linux-india@xxxxxxxxx
> Subject:	Re: script timer
> 
> 
> OK. get back. :-)
> 
> Binand
> --------------------------------------------------------------------
> For more information on Linux in India visit http://www.linux-india.org/
> The Linux India mailing list does not accept postings in HTML format.
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------