httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: SysV Shared Memory Patch
Date Tue, 20 Feb 1996 14:36:45 GMT
David Robinson wrote:
> 
> >David Robinson wrote:
> >> 
> >> Surely not? On Solaris children inherit shared memory segments.
> >> 
> >
> >patch 108a. now uploaded... Fixes my fork/exec confusion.
> 
> Looks good; might I suggest that the patch also define HAVE_SHMGET
> (without MOVEBREAK) for IRIX, as mail posted here suggests that it would work.
> 
> A minor niggle; you should delete the segment if the shmat fails, i.e.
>      if ((scoreboard_image = (short_score*)shmat(shmid, NULL, 0)) ==
> 	(short_score *)-1)
>      {
>       perror("shmat");
>        fprintf(stderr, "httpd: Could not call shmat\n");
>        shmctl(shmid, IPC_RMID, NULL);
>        exit(1);
>      }
> 
> and it would be nice to log the shmid to the error log if the shmget
> succeeds. (That way the sysadmin can try and delete it himself if
> something breaks).
> 
> and it would read better if shmget was in the same routine as shmat
> [That's enough 'suggestions' - ed.]
> 

All good suggestions! I'll fold shmget into attach_seg, make sure that
the seg's deleted if shmart fails and do some better logging.

I'll upload 108b soon.

-- 
Jim Jagielski  << jim@jaguNET.com >>   |      "That's a Smith & Wesson,
  **  jaguNET Access Services  **      |       and you've had your six" 
      Email: info@jaguNET.com          |             - James Bond
++    http://www.jaguNET.com/         +++      Voice/Fax: 410-931-7060       ++

Mime
View raw message