mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-23 08:24:18 +00:00
27 lines
453 B
C
27 lines
453 B
C
/* maketask call for unix */
|
|
|
|
int maketask(fname,flags,priority,argptrs)
|
|
char *fname;
|
|
int flags,priority;
|
|
char **argptrs;
|
|
{
|
|
|
|
register int pid;
|
|
|
|
if(flags==0) { /* fork and exec */
|
|
if((pid=fork()) == 0) { /* child process */
|
|
doexecv:
|
|
execv(fname,argptrs);
|
|
return(-1);
|
|
}
|
|
return(pid); /* return child process id */
|
|
}
|
|
if(flags==2) { /* fork only */
|
|
return(fork());
|
|
}
|
|
if(flags==4) { /* exec only */
|
|
goto doexecv;
|
|
}
|
|
return(-1);
|
|
}
|