The implementation of LyXServer on OS/2 is very primitive and restricted.
Notably,
	- Both server and clients must run on UNIX or OS/2 machines.
	  Communications between LyX on UNIX and clients on OS/2 or
	  vice versa are not possible right now.
	- On OS/2, the pipe name stem (see $HOME/.lyx/lyxrc) must
	  begin with either "/pipe/" or "//machinename/pipe".
	- On OS/2, only one client can connect to LyXServer at a time.
	- On OS/2, clients must open inpipe with write only mode.
	- Clients must read and clear outpipe if LyXServer send something.
The last point is not a real problem if the client is written in a language
in which callback mechanism is available.  But if you use e.g. procedural
REXX, this can be a serious problem.  In the case of REXX, the situation
gets worse since chars("/pipe/.lyxpipe.out") may return 1 even if the pipe
is empty.  So charin() or linein() blocks if issued at inappropriate places.
(And LyX blocks if you do not call either of the function to clear the outpipe,
if the pipe is not empty.)  Probably you can try Concurrency support in Object
REXX instead.
BTW if you know how to avoid synchronization problem without resorting to
DosResetBuffer(), please let me know.

Here is the command line I used to compile monitor.exe:
gcc -m486 -o monitor.exe -O2 -fno-strength-reduce -Zmtd -Zsysv-signals -IF:/XFree86/include server_monitor.c -Zbin-files -LF:/XFree86/lib -lforms -lulib -lX11 -lbsd -lsocket -lc_alias -lc_static -lc_import -los2 -lemx2
