Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: mjeffery@cix.compulink.co.uk ("Mark Jeffery")
Subject: Re: Spawn OSF commands from C?...
Date: 1995/04/04	[thread overview]
Message-ID: <D6IuM8.9yM@cix.compulink.co.uk> (raw)
In-Reply-To: 1995Mar22.142836.15049@govonca.gov.on.ca

fork, and exec!

For example:

#include <stdio.h>

main() {
if (fork() == 0) {
  execve("ls","/bin/ls","-l",NULL);
  }
else {
  printf("I've forked to create a child, running ls\n");
  }
}

This is probably not right, but if you do a man fork, and a man exec, 
then it will help you.

Mark.



      parent reply	other threads:[~1995-04-04  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-22 14:28 Spawn OSF commands from C? Teresa Wawrzyczek
1995-03-23 18:33 ` Peter da Silva
1995-03-23 19:02 ` Greg Wooledge
1995-04-04  4:00 ` "Mark Jeffery" [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox