more unix ideas

Tim Smith tim at cithep.UucP
Wed May 22 13:27:58 AEST 1985


Re: system call to swap file table entries among processes...

I have always thought that this is reasonable, and that any system with
something like Berkely job control should do this.  I could not think
of anything wrong with it.

> 3) a mechanism for suspended logins.
> when a user does a suspend to a login shell,
> have init when the person relogins, swapfds to the new fds of
> the terminal the user is at now.

I am not sure I understand.  If the goal is to get something like the
reattach facility of TOPS-10, then it won't work.  Your old tty will
still be your controlling terminal.

> 
> 2) have another version of the exit sytem call,
>         which will just cause the parents wait to return,
>         without the process really exiting.
>         This so that a process could put itself in background.
>         (i.e. the shell would interpret that as a returned wait
>         that the process does not want to be waited for anymore)
> 
How about

	FakeExit( value )
		int value;
	{
		int pid;
#ifdef PRIMITIVE_UNIX_WITHOUT_COPY_ON_WRITE_FORK
# ifdef BSD
#  define fork vfork
# endif
#endif
		while ( ( pid = fork() ) < 0 )
			;
		if ( pid )
			_exit( value );
	}
-- 
					Tim Smith
				ihnp4!{wlbr!callan,cithep}!tim



More information about the Comp.unix.wizards mailing list