5409
|
1 |
"{ Package: 'stx:libbasic' }"
|
|
2 |
|
4762
|
3 |
OSFileHandle subclass:#UnixFileDescriptorHandle
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'OS-Unix'
|
|
8 |
!
|
|
9 |
|
|
10 |
!UnixFileDescriptorHandle primitiveDefinitions!
|
|
11 |
%{
|
|
12 |
#include <stdio.h>
|
|
13 |
%}
|
|
14 |
|
|
15 |
! !
|
|
16 |
|
|
17 |
|
5413
|
18 |
!UnixFileDescriptorHandle methodsFor:'release'!
|
4762
|
19 |
|
5409
|
20 |
closeFile
|
|
21 |
"close the underlying file"
|
4762
|
22 |
|
|
23 |
%{
|
|
24 |
INT fd = (INT)(__externalAddressVal(self));
|
|
25 |
|
|
26 |
if (fd > 0) {
|
|
27 |
__externalAddressVal(self) = (OBJ)-1;
|
|
28 |
close(fd);
|
|
29 |
}
|
|
30 |
%}.
|
|
31 |
|
|
32 |
! !
|
|
33 |
|
|
34 |
!UnixFileDescriptorHandle class methodsFor:'documentation'!
|
|
35 |
|
|
36 |
version
|
5413
|
37 |
^ '$Header: /cvs/stx/stx/libbasic/UnixFileDescriptorHandle.st,v 1.3 2000-06-23 19:43:40 cg Exp $'
|
4762
|
38 |
! !
|