Unix.st
changeset 947 2d067b1d716c
parent 932 f57ec42ceb44
child 1034 4d3ef5de3ec8
--- a/Unix.st	Thu Feb 08 22:47:08 1996 +0100
+++ b/Unix.st	Thu Feb 08 23:21:23 1996 +0100
@@ -257,17 +257,17 @@
 #  include <wingdi.h> /* */
 #  include <winuser.h> /* */
 
-#   ifdef __VM_Array
-#    define Array __VM_Array
+#   ifdef __DEF_Array
+#    define Array __DEF_Array
 #   endif
-#   ifdef __VM_Number
-#    define Number __VM_Number
+#   ifdef __DEF_Number
+#    define Number __DEF_Number
 #   endif
-#   ifdef __VM_Method
-#    define Method __VM_Method
+#   ifdef __DEF_Method
+#    define Method __DEF_Method
 #   endif
-#   ifdef __VM_Point
-#    define Point __VM_Point
+#   ifdef __DEF_Point
+#    define Point __DEF_Point
 #   endif
 # endif
 
@@ -777,7 +777,7 @@
 
 	FileNotFoundErrorSignal
 
-	LocaleInfo	<Dictionary>    if non nil, that is taken instead of the operating
+	LocaleInfo      <Dictionary>    if non nil, that is taken instead of the operating
 					systems locale definitions (allows for overwriting
 					these, or provide a compatible info on systems which do
 					not support locales)
@@ -1915,23 +1915,23 @@
 exec:aPath withArguments:argArray fileDescriptors:fdArray fork:doFork
     "Internal combined fork & exec;
      If fork is false:
-         execute the unix command specified by the argument, aPath, with
-         arguments in argArray (no arguments, if nil).
-         If successful, this method does not return and smalltalk is gone.
-         If not successful, false is returned. Normal use is with forkForCommand.
+	 execute the unix command specified by the argument, aPath, with
+	 arguments in argArray (no arguments, if nil).
+	 If successful, this method does not return and smalltalk is gone.
+	 If not successful, false is returned. Normal use is with forkForCommand.
      if its true:
-        for a child to do the above.
-        The id of the child process is returned; -1 if fork failed.
+	for a child to do the above.
+	The id of the child process is returned; -1 if fork failed.
 
      fdArray contains the filedescriptors, to be used for the child (if fork is true).
-        fdArray[1] = 15 -> use fd 15 as stdin.
-        If an element of the array is set to nil, the corresponding filedescriptor
-        will be closed for the child.
+	fdArray[1] = 15 -> use fd 15 as stdin.
+	If an element of the array is set to nil, the corresponding filedescriptor
+	will be closed for the child.
 
     Notice: this used to be two separate ST-methods; however, in order to use
-            vfork on some machines, it had to be merged into one, to avoid write
-            accesses to ST/X memory from the vforked-child. The code below only does
-            read accesses."
+	    vfork on some machines, it had to be merged into one, to avoid write
+	    accesses to ST/X memory from the vforked-child. The code below only does
+	    read accesses."
 
 %{
 #ifndef MSDOS_LIKE
@@ -1940,70 +1940,70 @@
     OBJ arg;
 
     if (__isString(aPath) && 
-        ((argArray == nil) || __isArray(argArray)) &&
-        ((fdArray == nil) || __isArray(fdArray))
+	((argArray == nil) || __isArray(argArray)) &&
+	((fdArray == nil) || __isArray(fdArray))
     ) {
-        nargs = argArray == nil ? 0 : _arraySize(argArray);
-        argv = (char **) malloc(sizeof(char *) * (nargs + 1));
-        if (argv) {
-            for (i=0; i < nargs; i++) {
-                arg = _ArrayInstPtr(argArray)->a_element[i];
-                if (__isString(arg)) {
-                    argv[i] = (char *) __stringVal(arg);
-                } else {
-                    argv[i] = "";
-                }
-            }
-            argv[i] = NULL;
-
-            if (doFork == true) {
-                int nfd;
-
-                nfd = fdArray == nil ? 0 : _arraySize(fdArray);
+	nargs = argArray == nil ? 0 : _arraySize(argArray);
+	argv = (char **) malloc(sizeof(char *) * (nargs + 1));
+	if (argv) {
+	    for (i=0; i < nargs; i++) {
+		arg = _ArrayInstPtr(argArray)->a_element[i];
+		if (__isString(arg)) {
+		    argv[i] = (char *) __stringVal(arg);
+		} else {
+		    argv[i] = "";
+		}
+	    }
+	    argv[i] = NULL;
+
+	    if (doFork == true) {
+		int nfd;
+
+		nfd = fdArray == nil ? 0 : _arraySize(fdArray);
 #ifdef HAS_VFORK
-                id = vfork();
+		id = vfork();
 #else
-                id = fork();
-#endif
-                if (id == 0) {
-                    /*
-                    ** In child.
-                    ** first: dup filedescriptors
-                    */
-                    for (i = 0; i < nfd; i++) {
-                        if (__isSmallInteger(_ArrayInstPtr(fdArray)->a_element[i]) &&
-                            __intVal(_ArrayInstPtr(fdArray)->a_element[i]) != i
-                        ) {
-                            dup2(__intVal(_ArrayInstPtr(fdArray)->a_element[i]), i);
-                        }
-                    }
-                    /*
-                    ** second: close unused filedescriptors
-                    */
-                    for (i = 0; i < nfd; i++) {
-                        if (_ArrayInstPtr(fdArray)->a_element[i] == nil) {
-                            close(i);
-                        }
-                    }
-                    execv(_stringVal(aPath), argv);
-                    /* should not be reached */
-                    _exit(127);                 /* POSIX 2 compatible exit value */
-                }
-                /*
-                ** In parent: succes or failure
-                */
-                free(argv);
-                RETURN (__MKSMALLINT(id));
-            } else {
-                execv(_stringVal(aPath), argv);
-                /* 
-                 * should not be reached
-                 * (well, it is, if you pass a wrong command-path)
-                 */
-                free(argv);
-                RETURN ( false );
-            }
-        }
+		id = fork();
+#endif
+		if (id == 0) {
+		    /*
+		    ** In child.
+		    ** first: dup filedescriptors
+		    */
+		    for (i = 0; i < nfd; i++) {
+			if (__isSmallInteger(_ArrayInstPtr(fdArray)->a_element[i]) &&
+			    __intVal(_ArrayInstPtr(fdArray)->a_element[i]) != i
+			) {
+			    dup2(__intVal(_ArrayInstPtr(fdArray)->a_element[i]), i);
+			}
+		    }
+		    /*
+		    ** second: close unused filedescriptors
+		    */
+		    for (i = 0; i < nfd; i++) {
+			if (_ArrayInstPtr(fdArray)->a_element[i] == nil) {
+			    close(i);
+			}
+		    }
+		    execv(_stringVal(aPath), argv);
+		    /* should not be reached */
+		    _exit(127);                 /* POSIX 2 compatible exit value */
+		}
+		/*
+		** In parent: succes or failure
+		*/
+		free(argv);
+		RETURN (__MKSMALLINT(id));
+	    } else {
+		execv(_stringVal(aPath), argv);
+		/* 
+		 * should not be reached
+		 * (well, it is, if you pass a wrong command-path)
+		 */
+		free(argv);
+		RETURN ( false );
+	    }
+	}
     }
 #endif
 %}.
@@ -2020,9 +2020,9 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        "I am the child"
-        OperatingSystem exec:'/bin/ls' withArguments:#('ls' '/tmp').
-        "not reached"
+	"I am the child"
+	OperatingSystem exec:'/bin/ls' withArguments:#('ls' '/tmp').
+	"not reached"
      ]
     "
     "
@@ -2030,9 +2030,9 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        "I am the child"
-        OperatingSystem exec:'/bin/sh' withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2').
-        "not reached"
+	"I am the child"
+	OperatingSystem exec:'/bin/sh' withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2').
+	"not reached"
      ].
      id printNL.
      (Delay forSeconds:3.5) wait.
@@ -2050,8 +2050,8 @@
 	 If successful, this method does not return and smalltalk is gone.
 	 If not successful, false is returned. Normal use is with forkForCommand.
      if its true:
-        for a child to do the above.
-        The id of the child process is returned; -1 if fork failed.
+	for a child to do the above.
+	The id of the child process is returned; -1 if fork failed.
 
     Notice: this used to be two separate ST-methods; however, in order to use
 	    vfork on some machines, it had to be merged into one, to avoid write
@@ -2065,29 +2065,29 @@
     OBJ arg;
 
     if (__isString(aPath) && ((argArray == nil) || __isArray(argArray))) {
-        nargs = argArray == nil ? 0 : _arraySize(argArray);
-        argv = (char **) malloc(sizeof(char *) * (nargs + 1));
-        if (argv) {
-            for (i=0; i < nargs; i++) {
-                arg = _ArrayInstPtr(argArray)->a_element[i];
-                if (__isString(arg)) {
-                    argv[i] = (char *) __stringVal(arg);
-                } else {
-                    argv[i] = "";
-                }
-            }
-            argv[i] = NULL;
-
-            if (doFork == true) {
+	nargs = argArray == nil ? 0 : _arraySize(argArray);
+	argv = (char **) malloc(sizeof(char *) * (nargs + 1));
+	if (argv) {
+	    for (i=0; i < nargs; i++) {
+		arg = _ArrayInstPtr(argArray)->a_element[i];
+		if (__isString(arg)) {
+		    argv[i] = (char *) __stringVal(arg);
+		} else {
+		    argv[i] = "";
+		}
+	    }
+	    argv[i] = NULL;
+
+	    if (doFork == true) {
 #ifdef HAS_VFORK
-                id = vfork();
+		id = vfork();
 #else
-                id = fork();
+		id = fork();
 #endif
 		if (id == 0) {
 		    execv(_stringVal(aPath), argv);
 		    /* should not be reached */
-		    _exit(127);		/* POSIX-2 compatible exit value */
+		    _exit(127);         /* POSIX-2 compatible exit value */
 		}
 		free(argv);
 		RETURN (__MKSMALLINT(id));
@@ -2117,9 +2117,9 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        "I am the child"
-        OperatingSystem exec:'/bin/ls' withArguments:#('ls' '/tmp').
-        "not reached"
+	"I am the child"
+	OperatingSystem exec:'/bin/ls' withArguments:#('ls' '/tmp').
+	"not reached"
      ]
     "
     "
@@ -2127,9 +2127,9 @@
 
      id := OperatingSystem fork.
      id == 0 ifTrue:[
-        "I am the child"
-        OperatingSystem exec:'/bin/sh' withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2').
-        "not reached"
+	"I am the child"
+	OperatingSystem exec:'/bin/sh' withArguments:#('sh' '-c' 'sleep 2;echo 1;sleep 2;echo 2').
+	"not reached"
      ].
      id printNL.
      (Delay forSeconds:3.5) wait.
@@ -2201,23 +2201,23 @@
     blocked := OperatingSystem blockInterrupts.
     pid := self startProcess:aCommandString.
     pid > 0 ifTrue:[
-        Processor monitorPid:pid action:[ :stat |
-            stat stillAlive ifFalse:[
-                exitStatus := stat.
-                sema signal
-            ].
-        ].
-        sema wait.
+	Processor monitorPid:pid action:[ :stat |
+	    stat stillAlive ifFalse:[
+		exitStatus := stat.
+		sema signal
+	    ].
+	].
+	sema wait.
     ] ifFalse:[
-        exitStatus := OSProcessStatus processCreationFailure.
+	exitStatus := OSProcessStatus processCreationFailure.
     ].
 
     blocked ifFalse:[
-        OperatingSystem unblockInterrupts
+	OperatingSystem unblockInterrupts
     ].
 
     exitStatus success ifFalse:[
-        ^ aBlock value:exitStatus
+	^ aBlock value:exitStatus
     ].
     ^ true.
 
@@ -2311,6 +2311,54 @@
      (Delay forSeconds:3) wait.
      OperatingSystem killProcess:pid.
     "
+!
+
+getStatusOfProcess:aProcessId
+    "wait for a process to terminate and fetch its exit status.
+     This is required to avoid zombie processes."
+
+%{
+#ifndef MSDOS_LIKE
+    int status;
+
+    if (__isSmallInteger(aProcessId)) {
+	pid_t pid = (pid_t)(__intVal(aProcessId));
+	{
+
+# ifdef  NO_WAITPID
+	    pid_t child;
+
+	    do {
+		__BEGIN_INTERRUPTABLE__
+		child = __wait (&status);
+		__END_INTERRUPTABLE__
+		if (child < 0 && errno != EINTR) {
+		    printf("5: errno=%d\n", errno);
+		    status = -1;
+		    break;
+		}
+	    } while (child != pid);
+# else
+	    pid_t child;
+
+	    /* claus: the original did not care for EINTR here ... */
+	    do {
+		__BEGIN_INTERRUPTABLE__
+		child = __waitpid (pid, &status, 0);
+		__END_INTERRUPTABLE__
+	    } while ((child != pid) && (errno == EINTR));
+	    if (child != pid) {
+		printf("6: errno=%d\n", errno);
+		status = -1;
+	    }
+# endif /* NO_WAITPID */
+	}
+	RETURN ( __MKSMALLINT(status));
+    }
+#endif
+%}.
+    self primitiveFailed
+
 ! !
 
 !OperatingSystem class methodsFor:'file access'!
@@ -2480,8 +2528,8 @@
 %{
 #if !defined(transputer) && !defined(MSDOS_LIKE)
      if (__isSmallInteger(anInteger)) {
-        close(__intVal(anInteger));
-        RETURN(self);
+	close(__intVal(anInteger));
+	RETURN(self);
      }
 #endif
 %}.
@@ -3001,7 +3049,7 @@
      int fds[2];
 
      if (pipe(fds) < 0)
-        RETURN(nil);
+	RETURN(nil);
 
      fd1 = __MKSMALLINT(fds[0]);
      fd2 = __MKSMALLINT(fds[1]);
@@ -3458,7 +3506,7 @@
 %{  /* NOCONTEXT */
 
     if (__isSmallInteger(signalNumber)) {
-        int sigNo = __intVal(signalNumber);
+	int sigNo = __intVal(signalNumber);
 
 	if (sigNo == 0) {
 	    RETURN (self);
@@ -3487,7 +3535,7 @@
     "disable timer interrupts.
      WARNING: 
 	the system will not operate correctly with timer interrupts
-        disabled, because no scheduling or timeouts are possible."
+	disabled, because no scheduling or timeouts are possible."
 
 %{  /* NOCONTEXT */
 
@@ -3510,9 +3558,9 @@
     "disable userInterrupt processing;
      when disabled, no ^C processing takes place.
      WARNING:
-         If at all, use this only for debugged stand-alone applications, since
-         no exit to the debugger is possible with user interrupts disabled.
-         We recommend setting up a handler for the signal instead of disabling it."
+	 If at all, use this only for debugged stand-alone applications, since
+	 no exit to the debugger is possible with user interrupts disabled.
+	 We recommend setting up a handler for the signal instead of disabling it."
 
     self disableSignal:(self sigBREAK).
     self disableSignal:(self sigINT).
@@ -3566,7 +3614,9 @@
 %{  /* NOCONTEXT */
 
     int ret, flags, f;
+#ifndef __signalIoInterrupt
     extern void __signalIoInterrupt();
+#endif
     static int firstCall = 1;
 
 #if (defined(F_GETFL) && defined(F_SETFL) && defined(FASYNC)) || defined(SYSV4)
@@ -3684,32 +3734,50 @@
 
     int sigNr;
 #if defined(SIGINT) || defined(SIGQUIT)
+# ifndef __signalUserInterrupt
     extern void __signalUserInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGFPE
+# ifndef __signalFpExceptionInterrupt
     extern void __signalFpExceptionInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGIO
+# ifndef __signalIoInterrupt
     extern void __signalIoInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef CHILD_SIGNAL
+# ifndef __signalChildInterrupt
     extern void __signalChildInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGPIPE
+# ifndef __signalPIPEInterrupt
     extern void __signalPIPEInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGBUS
+# ifndef __signalBUSInterrupt
     extern void __signalBUSInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGSEGV
+# ifndef __signalSEGVInterrupt
     extern void __signalSEGVInterrupt(SIGHANDLER_ARG);
+# endif
 #endif
 #ifdef SIGALRM
 # ifndef WIN32
+#  ifndef __signalTimerInterrupt
     extern void __signalTimerInterrupt(SIGHANDLER_ARG);
+#  endif
 # endif
 #endif
+#ifndef __signalInterrupt
     extern void __signalInterrupt(SIGHANDLER_ARG);
+#endif
     void (*handler)(SIGHANDLER_ARG);
 
     if (__isSmallInteger(signalNumber)
@@ -3837,11 +3905,13 @@
 
 #if defined(ITIMER_REAL)
     {
-        static int firstCall = 1;
-        struct itimerval dt;
-        extern void __signalTimerInterrupt(SIGHANDLER_ARG);
-
-        if (firstCall) {
+	static int firstCall = 1;
+	struct itimerval dt;
+#ifndef __signalTimerInterrupt
+	extern void __signalTimerInterrupt(SIGHANDLER_ARG);
+#endif
+
+	if (firstCall) {
 # ifdef HAS_SIGACTION
 	    struct sigaction act;
 
@@ -3851,25 +3921,25 @@
 	    sigaction(SIGALRM, &act, 0);
 # else
 #  ifdef HAS_SIGVEC
-            struct sigvec vec;
-
-            vec.sv_flags = 0;
-            sigemptyset(&vec.sv_mask);
-            vec.sv_handler = __signalTimerInterrupt;
-            sigvec(SIGALRM, &vec, NULL);
+	    struct sigvec vec;
+
+	    vec.sv_flags = 0;
+	    sigemptyset(&vec.sv_mask);
+	    vec.sv_handler = __signalTimerInterrupt;
+	    sigvec(SIGALRM, &vec, NULL);
 #  else
 	    signal(SIGALRM, __signalTimerInterrupt);
 #  endif
 # endif
 	    firstCall = 0;
-        }
-
-        dt.it_interval.tv_sec = 0;
-        dt.it_interval.tv_usec = 0;
-        dt.it_value.tv_sec = millis / 1000;
-        dt.it_value.tv_usec = (millis % 1000) * 1000;  
-        setitimer(ITIMER_REAL, &dt, 0);
-        RETURN (true);
+	}
+
+	dt.it_interval.tv_sec = 0;
+	dt.it_interval.tv_usec = 0;
+	dt.it_value.tv_sec = millis / 1000;
+	dt.it_value.tv_usec = (millis % 1000) * 1000;  
+	setitimer(ITIMER_REAL, &dt, 0);
+	RETURN (true);
     }
 #else
 # ifdef WIN32
@@ -3919,7 +3989,11 @@
 
 killProcess:processId
     "kill a unix process.
-     The process terminates immediately and has no chance to perform any cleanup actions"
+     The process terminates immediately and has no chance to perform any cleanup actions.
+
+     WARNING: in order to avoid zombie processes (on unix),
+	      you have to fetch the processes exitstatus with
+	      OperatingSystem>>getStatusOfProcess:aProcessId."
 
     self sendSignal:(self sigKILL) to:processId.
 
@@ -4004,7 +4078,13 @@
     "send a unix signal to some process (maybe myself).
      Returns false if any error occurred, true otherwise.
 
-     Do not confuse UNIX signals with Smalltalk-Signals."
+     Do not confuse UNIX signals with Smalltalk-Signals.
+
+     WARNING: in order to avoid zombie processes (on unix),
+	      you may have to fetch the processes exitstatus with
+	      OperatingSystem>>getStatusOfProcess:aProcessId
+	      if the signal terminates that process."
+
 %{
 #ifndef MSDOS_LIKE
     if (__bothSmallInteger(signalNumber, processId)) {
@@ -4034,7 +4114,9 @@
 
 %{  /* NOCONTEXT */
 
+#ifndef __spyInterrupt
     extern void __spyInterrupt();
+#endif
 #if defined(ITIMER_VIRTUAL)
     struct itimerval dt;
 
@@ -4081,7 +4163,11 @@
 
 terminateProcess:processId
     "terminate a unix process.
-     The process has a chance to do some cleanup."
+     The process has a chance to do some cleanup.
+
+     WARNING: in order to avoid zombie processes (on unix),
+	      you may have to fetch the processes exitstatus with
+	      OperatingSystem>>getStatusOfProcess:aProcessId."
 
     self sendSignal:(self sigTERM) to:processId.
 
@@ -4611,7 +4697,7 @@
        This method is mainly provided to augment error reports with some system
        information. 
        (in case of system/version specific OS errors, conditional workarounds and patches
-        may be based upon this info)
+	may be based upon this info)
 
      The returned info may (or may not) contain:
 	#system -> some operating system identification (irix, Linux, nt, win32s ...) 
@@ -4652,7 +4738,7 @@
     if (HIWORD(vsn) & 0x8000) {
 	s = "win32s";
     } else {
-        s = "nt";
+	s = "nt";
     }
     sys = __MKSTRING(s COMMA_CON);
     winVer = LOWORD(vsn);
@@ -4661,7 +4747,7 @@
 
     GetSystemInfo(&sysInfo);
     if (sysInfo.dwProcessorType) {
-        sprintf(vsnBuffer, "%d", sysInfo.dwProcessorType);
+	sprintf(vsnBuffer, "%d", sysInfo.dwProcessorType);
 	mach = __MKSTRING(vsnBuffer COMMA_CON);
     }
 
@@ -4799,9 +4885,9 @@
 maxFileNameLength
     "return the max number of characters in a filename.
      CAVEAT:
-         Actually, the following is somewhat wrong - some systems
-         support different sizezs, depending on the volume.
-         We return a somewhat conservative number here."
+	 Actually, the following is somewhat wrong - some systems
+	 support different sizezs, depending on the volume.
+	 We return a somewhat conservative number here."
 
 %{  /* NOCONTEXT */
  
@@ -4896,42 +4982,42 @@
     "return a dictionary filled with values from the locale information;
      Not all fields may be present, depending on the OS's setup and capabilities.
      Possible fields are:
-	decimalPoint			<String>
-
-        thousandsSep			<String>
-
-        internationalCurrencySymbol	<String>
-
-	currencySymbol			<String>
-
-	monetaryDecimalPoint		<String>
-
-	monetaryThousandsSeparator	<String>
-
-	positiveSign			<String>
-
-	negativeSign			<String>
-
-	internationalFractionalDigits	<Integer>
-
-	fractionalDigits		<Integer>
-
-	positiveSignPrecedesCurrencySymbol	<Boolean>
-
-	negativeSignPrecedesCurrencySymbol	<Boolean>
-
-	positiveSignSeparatedBySpaceFromCurrencySymbol	<Boolean>
-
-	negativeSignSeparatedBySpaceFromCurrencySymbol	<Boolean>
-
-	positiveSignPosition				<Symbol>
+	decimalPoint                    <String>
+
+	thousandsSep                    <String>
+
+	internationalCurrencySymbol     <String>
+
+	currencySymbol                  <String>
+
+	monetaryDecimalPoint            <String>
+
+	monetaryThousandsSeparator      <String>
+
+	positiveSign                    <String>
+
+	negativeSign                    <String>
+
+	internationalFractionalDigits   <Integer>
+
+	fractionalDigits                <Integer>
+
+	positiveSignPrecedesCurrencySymbol      <Boolean>
+
+	negativeSignPrecedesCurrencySymbol      <Boolean>
+
+	positiveSignSeparatedBySpaceFromCurrencySymbol  <Boolean>
+
+	negativeSignSeparatedBySpaceFromCurrencySymbol  <Boolean>
+
+	positiveSignPosition                            <Symbol>
 							one of: #parenthesesAround, 
-							        #signPrecedes, 
-							        #signSuceeds, 
-							        #signPrecedesCurrencySymbol,
+								#signPrecedes, 
+								#signSuceeds, 
+								#signPrecedesCurrencySymbol,
 								#signSuceedsCurrencySymbol
 
-	negativeSignPosition				<like above>
+	negativeSignPosition                            <like above>
 
      it is up to the application to deal with undefined values.
 
@@ -5104,7 +5190,7 @@
 	    val = nil;
     }
     if (val != nil) {
-        __AT_PUT_(info, @symbol(positiveSignPosition), val);
+	__AT_PUT_(info, @symbol(positiveSignPosition), val);
     }
 
     switch (csNegSignPosition) {
@@ -5158,16 +5244,16 @@
      |d|
 
      d := IdentityDictionary new.
-     d at:#decimalPoint                 put:'.'		.
-     d at:#thousandsSeparator           put:','		.
-     d at:#currencySymbol               put:'USD'	.
-     d at:#monetaryDecimalPoint         put:'.'		.
-     d at:#monetaryThousandsSeparator   put:'.'		.
-     d at:#fractionalDigits		put:2		.
-     d at:#positiveSign  		put:'+'		.
-     d at:#negativeSign  		put:'-'		.
-     d at:#positiveSignPrecedesCurrencySymbol put:true		.
-     d at:#negativeSignPrecedesCurrencySymbol put:false		.
+     d at:#decimalPoint                 put:'.'         .
+     d at:#thousandsSeparator           put:','         .
+     d at:#currencySymbol               put:'USD'       .
+     d at:#monetaryDecimalPoint         put:'.'         .
+     d at:#monetaryThousandsSeparator   put:'.'         .
+     d at:#fractionalDigits             put:2           .
+     d at:#positiveSign                 put:'+'         .
+     d at:#negativeSign                 put:'-'         .
+     d at:#positiveSignPrecedesCurrencySymbol put:true          .
+     d at:#negativeSignPrecedesCurrencySymbol put:false         .
      OperatingSystem setLocaleInfo:d
     "
 ! !
@@ -5477,7 +5563,7 @@
      WARNING: 
 	this is OperatingSystem dependent
 	- for portable code, use getTimeParts and compute*PartsOf:and:for:.
-        Better yet, use Date>>today or Time>>now for fully ST-80 compatible code."
+	Better yet, use Date>>today or Time>>now for fully ST-80 compatible code."
 
     ^ (OperatingSystem getTimeInto:[:low :hi | hi*16r10000 + low])
 
@@ -5597,7 +5683,7 @@
     int t = __intVal(millis);
 
     if (t) {
-        Sleep(t);
+	Sleep(t);
     }
     RETURN (self);
 #endif
@@ -5848,7 +5934,7 @@
 #else
 # ifdef MSDOS_LIKE
     if (firstCall) {
-        int nameSize = sizeof(cachedName);
+	int nameSize = sizeof(cachedName);
 
 	if (GetUserName(cachedName, &nameSize) == TRUE) {
 	    name = cachedName;
@@ -6032,7 +6118,7 @@
 #   define WSTOPSIG(stat)       ((int)(((stat)>>8)&0377))
 #  endif /*!WIFEXITED*/
 #  if !defined(WCOREDUMP)
-#   define WCOREDUMP(stat)	((int)(((stat)>>8)&0200))
+#   define WCOREDUMP(stat)      ((int)(((stat)>>8)&0200))
 #  endif /*!WCOREDUMP*/
 
     if (blocking != true) {
@@ -6180,8 +6266,8 @@
     }
 
     if (readFdArray != nil) {
-        if (! __isArray(readFdArray)) {
-	    goto fail;	
+	if (! __isArray(readFdArray)) {
+	    goto fail;  
 	}
 	count = __arraySize(readFdArray);
 	for (i=0; i<count;i++) {
@@ -6217,9 +6303,9 @@
     }
     t = _intVal(millis);
     if (t != 0) {
-        /*
-         * delay only 
-         */
+	/*
+	 * delay only 
+	 */
 	Sleep(t);
     }
     RETURN (nil);
@@ -6405,6 +6491,6 @@
 !OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.120 1996-02-04 19:06:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.121 1996-02-08 22:21:23 cg Exp $'
 ! !
 OperatingSystem initialize!