lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev Uniform treatment of fork() and beginthread() calls in lynx


From: vtailor
Subject: lynx-dev Uniform treatment of fork() and beginthread() calls in lynx
Date: Thu, 25 May 2000 14:54:04 -0400

I have posted elsewhere on Usenet that there is a simple procedure for
transforming programs like lynx that use fork() calls to programs that
use setjmp/longjmp and beginthread().  The basic idea is to setjmp at
the fork() point and change the end of the child thread to a call on
beginthread followed by a longjmp to the parent thread.

It seems to me that the lynx code that has calls on fork() could be
streamlined, and all the alternative code version #ifdefs greatly
reduced in number if it were rewritten so that both the fork() and the
beginthread() versions are set up identically, with setjmp() where the
fork() call was originally, and either beginthread() or a fictitious,
but similar, beginfork() function at the *bottom* of the child thread,
followed by the longjmp to the parent thread.

On systems that don't support fork() or beginthread(), it might just be
possible to use spawn calls followed by longjmp to the parent thread to
call support programs that replace the child functions, depending on
just what problems arise in getting things like socket addresses back
to the calling process.

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]