jar.c

Godmar Back gback at cs.utah.edu
Thu Jul 2 18:46:20 PDT 1998


I think the best place to put the flag is in the syscall interface.
Try applying the following patches (ignore the SIGHUP stuff in jthread.c)
and let me know if they don't work.

	- Godmar

Index: unix-internal/internalCalls.c
===================================================================
RCS file: /home/cvspublic/kaffe/kaffe/kaffevm/systems/unix-internal/internalCalls.c,v
retrieving revision 1.3
diff -r1.3 internalCalls.c
179c179,180
< int threadedFileDescriptor(int fd)
---
> static int 
> threadedFileDescriptor(int fd)
183a185,195
> static int
> threadedOpen(const char *name, int flags, int mode)
> {
> 	/* Cygnus NT requires this */
> 	int fd = open(name, 
> #if defined(O_BINARY)
> 		O_BINARY |
> #endif
> 		flags, mode);
> }
> 
187c199
< 	open,			/* warning because third argument is mode_t */
---
> 	threadedOpen,
Index: unix-jthreads/jthread.c
===================================================================
RCS file: /home/cvspublic/kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c,v
retrieving revision 1.10
diff -r1.10 jthread.c
753d752
< 	catchSignal(SIGHUP, restore_fds_and_exit);
754a754,759
> 	/* XXX this is f***ed.  On BSD, we get a SIGHUP if we try to put
> 	 * a process that has a pseudo-tty in async mode in the background
> 	 * So we'll just ignore it and keep running.  Note that this will
> 	 * detach us from the session too.
> 	 */
> 	catchSignal(SIGHUP, SIG_IGN);
1523c1528,1533
< 	fd = open(path, flags, mode);
---
> 	/* Cygnus WinNT requires this */
> 	fd = open(path, 
> #if defined(O_BINARY)
> 		O_BINARY |
> #endif
> 		flags, mode);


More information about the kaffe mailing list