824N/A * (c) Copyright 1992-1994 Adobe Systems Incorporated. 824N/A * Permission to use, copy, modify, distribute, and sublicense this software 824N/A * and its documentation for any purpose and without fee is hereby granted, 824N/A * provided that the above copyright notices appear in all copies and that 824N/A * both those copyright notices and this permission notice appear in 824N/A * supporting documentation and that the name of Adobe Systems Incorporated 824N/A * not be used in advertising or publicity pertaining to distribution of the 824N/A * software without specific, written prior permission. No trademark license 824N/A * to use the Adobe trademarks is hereby granted. If the Adobe trademark 824N/A * "Display PostScript"(tm) is used to describe this software, its 824N/A * functionality or for any other purpose, such use shall be limited to a 824N/A * statement that this software works in conjunction with the Display 824N/A * PostScript system. Proper trademark attribution to reflect Adobe's 824N/A * ownership of the trademark shall be given whenever any such reference to 824N/A * the Display PostScript system is made. 824N/A * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR 824N/A * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 824N/A * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 824N/A * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 824N/A * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE 824N/A * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL 824N/A * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT, 824N/A * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN 824N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT 824N/A * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE. 824N/A * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems 824N/A * Incorporated which may be registered in certain jurisdictions 824N/A * Author: Adobe Systems Incorporated 824N/A#
define DOZETIME 1 /* time to wait for agent to start up (sec) */ 824N/A/* ---Private Functions--- */ 824N/A /* Ultrix has a nasty bug in getservbyname(). If the name passed 824N/A to it doesn't exist in the services list it will seg. fault... 824N/A /* So, for Ultrix we just default to the default default port :-) */ 824N/A /* Necesary to restart the server without a reboot */ 824N/A /* What the hell is all this? I'll tell you. We don't know 824N/A a prioi what port is free, so we try to bind to each 824N/A in sequence and return the one that works. */ 824N/A "Couldn't set TCP SO_DONTLINGER while recommending port.");
824N/A#
endif /* SO_REUSEADDR */ 824N/A /* We have a good port number */ 824N/A /* If the TCP socket exists, we just assume the UNIX one 824N/A is there too. FALL THRU! */ 824N/A int argc =
1;
/* 1, args[0]:=path, args[1]:=null */ 824N/A /* Create the argv list for the execl() call */ 824N/A /* now try to start up the agent... */ 824N/A /* Try to start the agent */ 824N/A exit(
1);
/* This is OKAY, we're the child here */ 824N/A /* SHOULD NEVER REACH HERE */ 824N/A }
else {
/* Parent (NX Client) */ 824N/A /* if decmips, pray that we hesitate long enough for the child... */ 824N/A /* Check on child (NX Agent) */ 824N/A /* Server terminated or stopped; don't care, result is same... */ 824N/A }
else {
/* we think the agent started okay */ 824N/A }
else {
/* Error in fork */