--- a/UnixOperatingSystem.st Thu Apr 25 11:30:13 2013 +0100
+++ b/UnixOperatingSystem.st Fri Apr 26 15:26:55 2013 +0100
@@ -12,56 +12,56 @@
"{ Package: 'stx:libbasic' }"
AbstractOperatingSystem subclass:#UnixOperatingSystem
- instanceVariableNames:''
- classVariableNames:'HostName DomainName SlowFork ForkFailed CurrentDirectory
+ instanceVariableNames: ''
+ classVariableNames: 'HostName DomainName SlowFork ForkFailed CurrentDirectory
LastTimeInfo LastTimeInfoSeconds LastTimeInfoMilliseconds
LastTimeInfoIsLocal CachedMountPoints CacheMountPointsTimeStamp
Codeset CodesetEncoder'
- poolDictionaries:''
- category:'OS-Unix'
+ poolDictionaries: ''
+ category: 'OS-Unix'
!
Object subclass:#FileDescriptorHandle
- instanceVariableNames:'fd'
- classVariableNames:'OpenFiles'
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ instanceVariableNames: 'fd'
+ classVariableNames: 'OpenFiles'
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
OSFileHandle subclass:#FilePointerHandle
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
Object subclass:#FileStatusInfo
- instanceVariableNames:'type mode uid gid size id accessed modified statusChanged path
+ instanceVariableNames: 'type mode uid gid size id accessed modified statusChanged path
numLinks'
- classVariableNames:''
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ classVariableNames: ''
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
Object subclass:#MountInfo
- instanceVariableNames:'mountPointPath deviceOrRemotePath fsType attributeString'
- classVariableNames:''
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ instanceVariableNames: 'mountPointPath deviceOrRemotePath fsType attributeString'
+ classVariableNames: ''
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
Object subclass:#OSProcessStatus
- instanceVariableNames:'pid status code core'
- classVariableNames:''
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ instanceVariableNames: 'pid status code core'
+ classVariableNames: ''
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
UnixOperatingSystem::FileDescriptorHandle subclass:#SocketHandle
- instanceVariableNames:''
- classVariableNames:'ProtocolCache'
- poolDictionaries:''
- privateIn:UnixOperatingSystem
+ instanceVariableNames: ''
+ classVariableNames: 'ProtocolCache'
+ poolDictionaries: ''
+ privateIn: UnixOperatingSystem
!
!UnixOperatingSystem primitiveDefinitions!
@@ -528,341 +528,6 @@
%}
! !
-!UnixOperatingSystem primitiveFunctions!
-%{
-
-/*
- * some systems' system() is broken in that it does not correctly
- * handle EINTR and returns failure even though it actually succeeded.
- * (LINUX is one of them)
- * Here is a fixed version. If you encounter EINTR returns from
- * UnixOperatingSystem>>executeCommand, you ought to define WANT_SYSTEM
- * in the xxxIntern.h file to get this fixed version.
- *
- * As an added BONUS, this system() enables interrupts while waiting
- * for the child which enables other threads to continue.
- * (i.e. it is RT safe)
- */
-
-#if defined(WANT_SYSTEM)
-
-/* # define DPRINTF(x) printf x */
-# define DPRINTF(x) /* nothing */
-
-# ifndef _STDDEF_H_INCLUDED_
-# include <stddef.h>
-# define _STDDEF_H_INCLUDED_
-# endif
-
-# ifndef _STDLIB_H_INCLUDED_
-# include <stdlib.h>
-# define _STDLIB_H_INCLUDED_
-# endif
-
-# ifndef _UNISTD_H_INCLUDED_
-# include <unistd.h>
-# define _UNISTD_H_INCLUDED_
-# endif
-
-# ifndef _SYS_WAIT_H_INCLUDED
-# include <sys/wait.h>
-# define _SYS_WAIT_H_INCLUDED
-# endif
-
-# ifndef _SIGNAL_H_INCLUDED_
-# include <signal.h>
-# define _SIGNAL_H_INCLUDED_
-# endif
-
-# ifndef _SYS_TYPES_H_INCLUDED_
-# include <sys/types.h>
-# define _SYS_TYPES_H_INCLUDED_
-# endif
-
-# if (!defined(HAVE_GNU_LD) && !defined (__ELF__)) || !defined(LINUX)
-# define __environ environ
-# if 1 /* !defined(LINUX) */
-# define __sigemptyset sigemptyset
-# define __sigaction sigaction
-# define __sigaddset sigaddset
-# define __sigprocmask sigprocmask
-# define __execve execve
-# define __wait wait
-# define __waitpid waitpid
-# endif /* ! LINUX */
-// # ifndef __osx__
- extern char **environ;
-// # endif
-# endif
-
-# define __sigprocmask sigprocmask
-# define __execve execve
-
-# define SHELL_PATH "/bin/sh" /* Path of the shell. */
-# define SHELL_NAME "sh" /* Name to give it. */
-
-
-static int
-mySystem(line)
- register CONST char *line;
-{
- int status, save;
- pid_t pid;
- struct sigaction sa, intr, quit;
- sigset_t block, omask;
-
- if (line == NULL)
- return -1;
-
- sa.sa_handler = SIG_IGN;
- sa.sa_flags = 0;
- __sigemptyset (&sa.sa_mask);
-
- if (__sigaction (SIGINT, &sa, &intr) < 0) {
- DPRINTF(("1: errno=%d\n", errno));
- return -1;
- }
- if (__sigaction (SIGQUIT, &sa, &quit) < 0) {
- save = errno;
- (void) __sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- errno = save;
- DPRINTF(("2: errno=%d\n", errno));
- return -1;
- }
-
- __sigemptyset (&block);
- __sigaddset (&block, SIGCHLD);
- save = errno;
- if (__sigprocmask(SIG_BLOCK, &block, &omask) < 0) {
- if (errno == ENOSYS)
- errno = save;
- else {
- save = errno;
- (void) __sigaction(SIGINT, &intr, (struct sigaction *) NULL);
- (void) __sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
- errno = save;
- DPRINTF(("3: errno=%d\n", errno));
- return -1;
- }
- }
-
- pid = FORK ();
- if (pid == (pid_t) 0) {
- /* Child side. */
- CONST char *new_argv[4];
- new_argv[0] = SHELL_NAME;
- new_argv[1] = "-c";
- new_argv[2] = line;
- new_argv[3] = NULL;
-
- /* Restore the signals. */
- (void) __sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- (void) __sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
- (void) __sigprocmask (SIG_SETMASK, &omask, (sigset_t *) NULL);
-
- /* Exec the shell. */
- (void) __execve (SHELL_PATH, (char *CONST *) new_argv, __environ);
- _exit (127);
- } else {
- if (pid < (pid_t) 0) {
- /* The fork failed. */
- DPRINTF(("4: errno=%d\n", errno));
- status = -1;
- } else {
- /* Parent side. */
-#ifdef NO_WAITPID
- pid_t child;
-
- do {
- __BEGIN_INTERRUPTABLE__
- child = __wait (&status);
- __END_INTERRUPTABLE__
- if (child < 0 && errno != EINTR) {
- DPRINTF(("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) {
- DPRINTF(("6: errno=%d\n", errno));
- status = -1;
- }
-#endif /* NO_WAITPID */
- }
- }
- save = errno;
- if ((__sigaction (SIGINT, &intr, (struct sigaction *) NULL)
- | __sigaction (SIGQUIT, &quit, (struct sigaction *) NULL)
- | __sigprocmask (SIG_SETMASK, &omask, (sigset_t *) NULL)) != 0) {
- if (errno == ENOSYS) {
- errno = save;
- } else {
- status = -1;
- DPRINTF(("7: errno=%d\n", errno));
- }
- }
-
- return status;
-}
-#else
-# define __wait wait
-#endif /* WANT_SYSTEM */
-
-
-/*
- * some systems do not have realpath();
- * the alternative of reading from a 'pwp'-pipe
- * is way too slow. Here is a realpath for the rest of us.
- * define WANT_REALPATH in the xxxIntern-file to get it.
- */
-
-#if defined(HAS_REALPATH)
-# undef WANT_REALPATH
-#endif
-#if !defined(HAS_GETWD) && !defined(HAS_GETCWD)
-# undef WANT_REALPATH
-#endif
-
-#if defined(WANT_REALPATH)
-
-# ifndef NULL
-# define NULL (char *)0
-# endif
-
-# define MAX_READLINKS 32
-
-# ifndef MAXPATHLEN
-# define MAXPATHLEN 1024
-# endif
-
-static
-char *
-realpath(path, resolved_path)
- char *path;
- char resolved_path [];
-{
- char copy_path[MAXPATHLEN];
- char link_path[MAXPATHLEN];
- char *new_path = resolved_path;
- char *max_path;
- int readlinks = 0;
- int n;
-
- /* Make a copy of the source path since we may need to modify it. */
- strcpy(copy_path, path);
- path = copy_path;
- max_path = copy_path + MAXPATHLEN - 2;
- /* If it's a relative pathname use getwd for starters. */
- if (*path != '/') {
-#ifdef HAS_GETCWD
- new_path = getcwd(new_path, MAXPATHLEN - 1);
-#else
- new_path = getwd(new_path);
-#endif
- if (new_path == NULL)
- return(NULL);
-
- new_path += strlen(new_path);
- if (new_path[-1] != '/')
- *new_path++ = '/';
- }
- else {
- *new_path++ = '/';
- path++;
- }
- /* Expand each slash-separated pathname component. */
- while (*path != '\0') {
- /* Ignore stray "/". */
- if (*path == '/') {
- path++;
- continue;
- }
- if (*path == '.') {
- /* Ignore ".". */
- if (path[1] == '\0' || path[1] == '/') {
- path++;
- continue;
- }
- if (path[1] == '.') {
- if (path[2] == '\0' || path[2] == '/') {
- path += 2;
- /* Ignore ".." at root. */
- if (new_path == resolved_path + 1)
- continue;
- /* Handle ".." by backing up. */
- while ((--new_path)[-1] != '/')
- ;
- continue;
- }
- }
- }
- /* Safely copy the next pathname component. */
- while (*path != '\0' && *path != '/') {
- if (path > max_path) {
- errno = ENAMETOOLONG;
- return NULL;
- }
- *new_path++ = *path++;
- }
-#ifdef S_IFLNK
- /* Protect against infinite loops. */
- if (readlinks++ > MAX_READLINKS) {
- errno = ELOOP;
- return NULL;
- }
- /* See if latest pathname component is a symlink. */
- *new_path = '\0';
- n = readlink(resolved_path, link_path, MAXPATHLEN - 1);
- if (n < 0) {
- /* EINVAL means the file exists but isn't a symlink. */
- if (errno != EINVAL)
- return NULL;
- }
- else {
- /* Note: readlink doesn't add the null byte. */
- link_path[n] = '\0';
- if (*link_path == '/')
- /* Start over for an absolute symlink. */
- new_path = resolved_path;
- else
- /* Otherwise back up over this component. */
- while (*(--new_path) != '/')
- ;
- /* Safe sex check. */
- if (strlen(path) + n >= MAXPATHLEN) {
- errno = ENAMETOOLONG;
- return NULL;
- }
- /* Insert symlink contents into path. */
- strcat(link_path, path);
- strcpy(copy_path, link_path);
- path = copy_path;
- }
-#endif /* S_IFLNK */
- *new_path++ = '/';
- }
- /* Delete trailing slash but don't whomp a lone slash. */
- if (new_path != resolved_path + 1 && new_path[-1] == '/')
- new_path--;
- /* Make sure it's null terminated. */
- *new_path = '\0';
- return resolved_path;
-}
-# define HAS_REALPATH
-#endif /* WANT_REALPATH && not HAS_REALPATH */
-
-%}
-! !
-
!UnixOperatingSystem class methodsFor:'documentation'!
copyright
@@ -983,6 +648,7 @@
"
! !
+
!UnixOperatingSystem class methodsFor:'initialization'!
initialize
@@ -1023,6 +689,7 @@
"Modified: / 11.12.1998 / 16:22:48 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'OS signal constants'!
sigABRT
@@ -1754,6 +1421,7 @@
"
! !
+
!UnixOperatingSystem class methodsFor:'error messages'!
currentErrorNumber
@@ -2828,6 +2496,7 @@
"
! !
+
!UnixOperatingSystem class methodsFor:'executing OS commands-implementation'!
exec:aCommandPathArg withArguments:argColl environment:environmentDictionary
@@ -3272,6 +2941,7 @@
"Created: / 12.11.1998 / 14:39:20 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'executing OS commands-queries'!
commandAndArgsForOSCommand:aCommandString
@@ -3369,6 +3039,7 @@
"Modified: / 5.6.1998 / 19:03:32 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'file access'!
closeFd:anInteger
@@ -3896,6 +3567,7 @@
^ self primitiveFailed
! !
+
!UnixOperatingSystem class methodsFor:'file access rights'!
accessMaskFor:aSymbol
@@ -4038,6 +3710,7 @@
^ self primitiveFailed
! !
+
!UnixOperatingSystem class methodsFor:'file locking'!
lockFD:aFileDescriptor shared:isSharedReadLock blocking:blockIfLocked
@@ -4264,6 +3937,7 @@
^ false
! !
+
!UnixOperatingSystem class methodsFor:'file queries'!
caseSensitiveFilenames
@@ -5021,51 +4695,66 @@
|p path command|
path = '.' ifTrue:[
- ^ self getCurrentDirectory.
+ ^ self getCurrentDirectory.
].
"some systems have a convenient function for this ..."
path := self primPathNameOf:(self encodePath:pathName).
path notNil ifTrue:[
- path := self decodePath:path.
+ path := self decodePath:path.
] ifFalse:[
- (self isValidPath:pathName) ifFalse:[
- p := pathName.
- [(p size > 1)
- and:[p endsWith:(self fileSeparator)]
- ] whileTrue:[
- p := p copyWithoutLast:1.
- ].
- ^ p
- ].
-
- (SlowFork==true or:[PipeFailed==true]) ifFalse:[
- PipeStream openErrorSignal handle:[:ex |
- PipeFailed := true.
- 'UnixOperatingSystem [warning]: cannot fork/popen' errorPrintCR.
- ex return.
- ] do:[
- "have to fall back ..."
- command := 'cd "' , pathName , '"; pwd'.
- p := PipeStream readingFrom:command.
- ].
-
- (p isNil or:[p atEnd]) ifTrue:[
- ('UnixOperatingSystem [warning]: PipeStream for <' , command , '> failed') errorPrintCR.
- ] ifFalse:[
- path := p nextLine.
- p close.
- ]
- ].
- path isNil ifTrue:[
- "/
- "/ return the original - there is nothing else can we do
- "/
- path := pathName
- ].
- (SlowFork==true or:[ForkFailed==true]) ifTrue:[
- path := self compressPath:path
- ]
+ (self isValidPath:pathName) ifFalse:[
+ p := pathName.
+ [(p size > 1)
+ and:[p endsWith:(self fileSeparator)]
+ ] whileTrue:[
+ p := p copyButLast:1.
+ ].
+ ^ p
+ ].
+
+ (SlowFork==true or:[PipeFailed==true]) ifFalse:[
+ |directoryName fileBaseName|
+
+ (self isDirectory:pathName) ifTrue:[
+ directoryName := pathName.
+ fileBaseName := nil.
+ ] ifFalse:[
+ |pathFilename|
+ pathFilename := pathName asFilename.
+ directoryName := pathFilename directoryName.
+ fileBaseName := pathFilename baseName.
+ ].
+
+ PipeStream openErrorSignal handle:[:ex |
+ PipeFailed := true.
+ 'UnixOperatingSystem [warning]: cannot fork/popen' errorPrintCR.
+ ex return.
+ ] do:[
+ "have to fall back ..."
+ command := 'cd "' , directoryName , '"; pwd'.
+ p := PipeStream readingFrom:command.
+ ].
+
+ (p isNil or:[p atEnd]) ifTrue:[
+ ('UnixOperatingSystem [warning]: PipeStream for <' , command , '> failed') errorPrintCR.
+ ] ifFalse:[
+ path := p nextLine.
+ p close.
+ ].
+ fileBaseName notNil ifTrue:[
+ path := path, '/', fileBaseName.
+ ].
+ ].
+ path isNil ifTrue:[
+ "/
+ "/ return the original - there is nothing else can we do
+ "/
+ path := pathName
+ ].
+ (SlowFork==true or:[ForkFailed==true]) ifTrue:[
+ path := self compressPath:path
+ ]
].
^ path.
@@ -5153,21 +4842,38 @@
Notice: if symbolic links are involved, the result may look different
from what you expect."
+ |error|
+
%{ /* UNLIMITEDSTACK */
if (__isStringLike(pathName)) {
#ifdef HAS_REALPATH
- {
- char nameBuffer[MAXPATHLEN+1];
-
- if (realpath(__stringVal(pathName), nameBuffer)) {
- RETURN ( __MKSTRING(nameBuffer) );
- }
- }
+ // POSIX-2008 says, that a NULL namebuffer causes realPath to malloc()
+ // the required memory. But this does not work as of 2013-04
+ char nameBuffer[MAXPATHLEN+1];
+ char *nameP = realpath(__stringVal(pathName), nameBuffer);
+ if (nameP) {
+ OBJ ret = __MKSTRING(nameP);
+ // free(nameP);
+ RETURN ( ret );
+ }
+ // fprintf(stderr, "stx[warning]: realpath(\"%s\") failed: %s\n", __stringVal(pathName), strerror(errno));
#endif /* ! HAS_REALPATH */
- }
-%}.
+ } else {
+ error = @symbol(argument); // argument is not a string
+ }
+%}.
+"/ Does not work as of 2013-04 (UNLIMITEDSTACK problem?)
+"/ error notNil ifTrue:[
+"/ ^ self primitiveFailed:error.
+"/ ].
^ nil
+
+ "
+ self primPathNameOf:'.'
+ self primPathNameOf:'/murks/quatsch/bla/.'
+ self primPathNameOf:5555
+ "
!
timeOfLastAccess:aPathName
@@ -5341,6 +5047,7 @@
"Modified: / 5.6.1998 / 18:38:11 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'interrupts & signals'!
defaultSignal:signalNumber
@@ -6040,6 +5747,7 @@
"Modified: / 27.1.1998 / 20:05:59 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'ipc support'!
makeBidirectionalPipe
@@ -6342,41 +6050,42 @@
self primitiveFailed
! !
+
!UnixOperatingSystem class methodsFor:'misc'!
closeLeftOverFiles
"a bad bad kludge and workaround for a big bug in the linux
getAddrInfo implementation:
- if it gets interrupted (via a timer, for example), its domain-name
- socket remains open and is NEVER closed.
- These open files collect up and lead to no-more-files eventually.
+ if it gets interrupted (via a timer, for example), its domain-name
+ socket remains open and is NEVER closed.
+ These open files collect up and lead to no-more-files eventually.
Invoking this method helps in this situation."
|p|
p := PipeStream
- readingFrom:('lsof -p ' , (OperatingSystem getProcessId printString)).
+ readingFrom:('lsof -p ' , (OperatingSystem getProcessId printString)).
p linesDo:[:line |
- |words fd|
-
- words := line asCollectionOfWords.
- "/ COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
- words first = 'stx' ifTrue:[
- words second = (OperatingSystem getProcessId printString) ifTrue:[
- (words fourth endsWith:'u') ifTrue:[
- (words fifth = 'IPv4') ifTrue:[
- (words seventh = 'UDP') ifTrue:[
- (words last endsWith:'domain') ifTrue:[
- fd := Number readFrom:(words fourth copyWithoutLast:1).
+ |words fd|
+
+ words := line asCollectionOfWords.
+ "/ COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
+ words first = 'stx' ifTrue:[
+ words second = (OperatingSystem getProcessId printString) ifTrue:[
+ (words fourth endsWith:'u') ifTrue:[
+ (words fifth = 'IPv4') ifTrue:[
+ (words seventh = 'UDP') ifTrue:[
+ (words last endsWith:'domain') ifTrue:[
+ fd := Number readFrom:(words fourth copyButLast:1).
Transcript showCR:line.
- OperatingSystem closeFd:fd.
- ]
- ]
- ]
- ]
- ]
- ]
+ OperatingSystem closeFd:fd.
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
].
p close.
@@ -6422,6 +6131,7 @@
"Modified: 22.4.1996 / 13:13:09 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'os queries'!
executableFileExtensions
@@ -8556,6 +8266,7 @@
! !
+
!UnixOperatingSystem class methodsFor:'path queries'!
decodePath:encodedPathName
@@ -8685,6 +8396,7 @@
"Created: / 12.6.1998 / 16:30:43 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'shared memory access'!
shmAttach:id address:addr flags:flags
@@ -8767,6 +8479,7 @@
"Modified: 22.4.1996 / 13:14:46 / cg"
! !
+
!UnixOperatingSystem class methodsFor:'socket creation'!
socketAccessor
@@ -8783,6 +8496,7 @@
^ SocketHandle new domain:domainArg type:typeArg protocol:protocolArg
! !
+
!UnixOperatingSystem class methodsFor:'time and date'!
computeOSTimeFromUTCYear:y month:m day:d hour:h minute:min second:s millisecond:millis
@@ -9225,6 +8939,7 @@
"
! !
+
!UnixOperatingSystem class methodsFor:'users & groups'!
getEffectiveGroupID
@@ -9595,6 +9310,7 @@
"
! !
+
!UnixOperatingSystem class methodsFor:'waiting for events'!
blockingChildProcessWait
@@ -10313,6 +10029,7 @@
^ self primitiveFailed
! !
+
!UnixOperatingSystem::FileDescriptorHandle class methodsFor:'change & update'!
update:aspect with:argument from:anObject
@@ -10332,6 +10049,7 @@
"Created: 30.9.1997 / 12:57:35 / stefan"
! !
+
!UnixOperatingSystem::FileDescriptorHandle class methodsFor:'initialization'!
initialize
@@ -10346,6 +10064,7 @@
"Modified: 30.9.1997 / 12:40:55 / stefan"
! !
+
!UnixOperatingSystem::FileDescriptorHandle class methodsFor:'instance creation'!
for:aFileDescriptor
@@ -10356,6 +10075,7 @@
"Created: 30.9.1997 / 14:00:00 / stefan"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'error handling'!
error:anErrorSymbolOrErrno
@@ -10368,6 +10088,7 @@
self primitiveFailed:anErrorSymbolOrErrno.
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'file access'!
close
@@ -10382,6 +10103,7 @@
"Modified: 30.9.1997 / 13:06:55 / stefan"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'initialization'!
for:aFileDescriptor
@@ -10407,6 +10129,7 @@
"Modified (comment): / 16-03-2013 / 00:04:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'input/output'!
readBytes:count into:aByteBuffer startingAt:firstIndex
@@ -10681,6 +10404,7 @@
"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'misc functions'!
nextError
@@ -10837,6 +10561,7 @@
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'private-accessing'!
fileDescriptor
@@ -10863,6 +10588,7 @@
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'queries'!
canReadWithoutBlocking
@@ -10978,6 +10704,7 @@
"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'registering'!
register
@@ -11010,6 +10737,7 @@
"Modified (comment): / 16-03-2013 / 00:04:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'releasing'!
invalidate
@@ -11022,6 +10750,7 @@
"Modified: 30.9.1997 / 12:42:16 / stefan"
! !
+
!UnixOperatingSystem::FileDescriptorHandle methodsFor:'waiting'!
readWaitWithTimeoutMs:timeout
@@ -11090,6 +10819,7 @@
^ canWrite not
! !
+
!UnixOperatingSystem::FilePointerHandle methodsFor:'release'!
closeFile
@@ -11106,6 +10836,7 @@
! !
+
!UnixOperatingSystem::FileStatusInfo class methodsFor:'instance creation'!
type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP numLinks:nL
@@ -11113,6 +10844,7 @@
type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP numLinks:nL
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'accessing'!
accessTime
@@ -11203,6 +10935,7 @@
^ uid
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'accessing-vms'!
fixedHeaderSize
@@ -11235,6 +10968,7 @@
^ nil
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'backward compatibility'!
accessed
@@ -11266,6 +11000,7 @@
^ self statusChangeTime
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'private-accessing'!
type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP numLinks:nL
@@ -11282,6 +11017,7 @@
numLinks := nL.
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'queries-access'!
isGroupExecutable
@@ -11356,6 +11092,7 @@
"
! !
+
!UnixOperatingSystem::FileStatusInfo methodsFor:'queries-type'!
isBlockSpecial
@@ -11390,6 +11127,7 @@
^ type == #unknown
! !
+
!UnixOperatingSystem::MountInfo methodsFor:'accessing'!
mountPointPath
@@ -11407,6 +11145,7 @@
attributeString := attributeStringArg.
! !
+
!UnixOperatingSystem::MountInfo methodsFor:'printing'!
printOn:aStream
@@ -11415,12 +11154,14 @@
nextPutAll:mountPointPath.
! !
+
!UnixOperatingSystem::MountInfo methodsFor:'queries'!
isRemote
^ fsType = 'nfs'
! !
+
!UnixOperatingSystem::OSProcessStatus class methodsFor:'documentation'!
documentation
@@ -11447,6 +11188,7 @@
"
! !
+
!UnixOperatingSystem::OSProcessStatus class methodsFor:'instance creation'!
pid:pid status:status code:code core:core
@@ -11467,6 +11209,7 @@
"Modified: 30.4.1996 / 18:25:05 / cg"
! !
+
!UnixOperatingSystem::OSProcessStatus methodsFor:'accessing'!
code
@@ -11505,6 +11248,7 @@
"Modified: 30.4.1996 / 18:26:54 / cg"
! !
+
!UnixOperatingSystem::OSProcessStatus methodsFor:'initialization'!
pid:newPid status:newStatus code:newCode core:newCore
@@ -11516,6 +11260,7 @@
"Created: 28.12.1995 / 14:18:22 / stefan"
! !
+
!UnixOperatingSystem::OSProcessStatus methodsFor:'printing & storing'!
printOn:aStream
@@ -11527,6 +11272,7 @@
aStream nextPut:$).
! !
+
!UnixOperatingSystem::OSProcessStatus methodsFor:'private-OS interface'!
code:something
@@ -11562,6 +11308,7 @@
"Created: 28.12.1995 / 14:05:07 / stefan"
! !
+
!UnixOperatingSystem::OSProcessStatus methodsFor:'queries'!
couldNotExecute
@@ -11590,6 +11337,7 @@
"Modified: 28.12.1995 / 14:13:41 / stefan"
! !
+
!UnixOperatingSystem::SocketHandle class methodsFor:'constants'!
protocolCodeOf:aNameOrNumber
@@ -11681,6 +11429,7 @@
"
! !
+
!UnixOperatingSystem::SocketHandle class methodsFor:'initialization'!
reinitialize
@@ -11689,6 +11438,7 @@
ProtocolCache := nil.
! !
+
!UnixOperatingSystem::SocketHandle class methodsFor:'queries'!
XXgetAddressInfo:hostName serviceName:serviceNameArg domain:domainArg type:typeArg protocol:protoArg flags:flags
@@ -12689,6 +12439,7 @@
^ result.
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'accepting'!
acceptWithPeerAddressBuffer:peerOrNil
@@ -12762,6 +12513,7 @@
^ self class for:newFd
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'binding'!
bindTo:socketAddress
@@ -12816,6 +12568,7 @@
"
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'connecting'!
cancelConnect
@@ -12938,6 +12691,7 @@
"
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'datagram transmission'!
receiveFrom:socketAddress buffer:aDataBuffer start:startIndex for:nBytes flags:flags
@@ -13174,6 +12928,7 @@
^ self error:error.
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'initialization'!
domain:domainArg type:typeArg protocol:protocolArg
@@ -13259,6 +13014,7 @@
"
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'misc'!
getOptionsLevel:level name:name
@@ -13450,6 +13206,7 @@
^ nil.
! !
+
!UnixOperatingSystem::SocketHandle methodsFor:'queries'!
getNameInto:socketAddress
@@ -13527,14 +13284,15 @@
^ nil
! !
+
!UnixOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.312 2013-04-25 09:23:16 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.314 2013-04-25 13:08:04 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.312 2013-04-25 09:23:16 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.314 2013-04-25 13:08:04 stefan Exp $'
!
version_HG
@@ -13543,5 +13301,5 @@
! !
+UnixOperatingSystem::FileDescriptorHandle initialize!
UnixOperatingSystem initialize!
-UnixOperatingSystem::FileDescriptorHandle initialize!