equal
deleted
inserted
replaced
1073 |
1073 |
1074 # define SHELL_PATH "/bin/sh" /* Path of the shell. */ |
1074 # define SHELL_PATH "/bin/sh" /* Path of the shell. */ |
1075 # define SHELL_NAME "sh" /* Name to give it. */ |
1075 # define SHELL_NAME "sh" /* Name to give it. */ |
1076 |
1076 |
1077 # ifndef FORK |
1077 # ifndef FORK |
1078 # define FORK __fork |
1078 # if defined(HAS_VFORK) |
|
1079 # define FORK vfork |
|
1080 # else |
|
1081 # define FORK fork |
|
1082 # endif |
1079 # endif |
1083 # endif |
1080 |
1084 |
1081 static int |
1085 static int |
1082 mySystem(line) |
1086 mySystem(line) |
1083 register CONST char *line; |
1087 register CONST char *line; |
3484 * fork a subprocess. |
3488 * fork a subprocess. |
3485 */ |
3489 */ |
3486 int nfd; |
3490 int nfd; |
3487 |
3491 |
3488 nfd = fdArray == nil ? 0 : __arraySize(fdArray); |
3492 nfd = fdArray == nil ? 0 : __arraySize(fdArray); |
3489 #ifdef HAS_VFORK |
3493 id = FORK (); |
3490 id = vfork(); |
|
3491 #else |
|
3492 id = fork(); |
|
3493 #endif |
|
3494 if (id == 0) { |
3494 if (id == 0) { |
3495 /* |
3495 /* |
3496 ** In child. |
3496 ** In child. |
3497 ** first: dup filedescriptors. |
3497 ** first: dup filedescriptors. |
3498 */ |
3498 */ |
12785 ! ! |
12785 ! ! |
12786 |
12786 |
12787 !UnixOperatingSystem class methodsFor:'documentation'! |
12787 !UnixOperatingSystem class methodsFor:'documentation'! |
12788 |
12788 |
12789 version |
12789 version |
12790 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.158 2003-04-11 13:20:07 penk Exp $' |
12790 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.159 2003-04-29 13:33:12 mb Exp $' |
12791 ! ! |
12791 ! ! |
12792 |
12792 |
12793 UnixOperatingSystem initialize! |
12793 UnixOperatingSystem initialize! |
12794 UnixOperatingSystem::FileDescriptorHandle initialize! |
12794 UnixOperatingSystem::FileDescriptorHandle initialize! |