#include stdio.h
#include sys/types.h
#include unistd.h
#include string.h
extern int errno;
main()
{
char c, string[100];
FILE * fp;
int k, s, childpid;
printf("test in beginning!
");
while((c = getchar()) == ' ');
for(;;)
{
if((childpid = vfork()) 0)
perror("childpid");
else if(childpid ==0 )
{
childpid=getpid();
printf("child %d in active!
", childpid);
while((c = getchar()) != '
')<...[ 查看全文 ]