Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8807) Server doesn't start with broken ser script
Home

[Freeciv-Dev] Re: (PR#8807) Server doesn't start with broken ser script

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8807) Server doesn't start with broken ser script
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 22 May 2004 02:41:11 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8807 >

On Sat, May 22, 2004 at 01:56:20AM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8807 >
> 
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8807 >
> > 
> > 
> > Client starts server. Server does 
> > 
> >   execvp("./ser", argv);
> > 
> > but the ser script doesn't find the civserver binary and exits the
> > script. But this will also exit the freshly forked server.
> > 
> > Solution 1: try "./server/civserver" before "./ser".
> > 
> > Solution 2: add a wrapper (sh -c) around the ser exec so that the
> > script's exit doesn't exit the server process.
> 
> It's hard to handle all cases here.  We should look for the civserver in 
> the same directory the civclient was run in ($prefix/civserver).  And 
> _maybe_ if that fails try $prefix/server/civserver or 
> $prefix/../server/civserver.  We should not try running the ser script 
> or any other wrapper.

> I'm not entirely sure how to tell what directory the civclient program 
> is in, though.

argv[0] is your friend.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Microsoft does have a year 2000 problem. I'm part of it. I'm running Linux.




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