You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by sa...@c2.org on 1996/04/05 03:03:47 UTC

Re: those nasty file descriptors (fwd)

	Looks like he's running Solaris 2.5. Also, it appears from the
truss below, that an open() happily returns an fd > 255, but a
socket() call fails. This 'truss' is near this segment in http_main.c:

    reinit_scoreboard(pconf);
    
    default_server_hostnames (server_conf);

    if ((sd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)) == -1) {
        fprintf(stderr,"httpd: could not get socket\n");
        perror("socket");
        exit(1);
    }

	So, in Solaris socket() isn't a syscall, but a wrapper around
another syscall? I suppose my BSD bias shows through here. I don't see
a socket() syscall in this truss log, but the socket() call is
returning a -1.


----- Forwarded message from Gregory Gulik -----

Here is the truss log:

getpid()                                        = 25750 [25749]
access("/usr/tmp/htlock.a006IM", 0)             Err#2 ENOENT
open("/usr/tmp/htlock.a006IM", O_WRONLY|O_CREAT, 0644) = 254
unlink("/usr/tmp/htlock.a006IM")                = 0
open("/usr/local/lib/httpd/logs/apache_runtime_status", O_RDWR|O_CREAT, 0644) =
255
write(255, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192)  = 8192
open("/etc/netconfig", O_RDONLY)                = 256
close(256)                                      = 0
open("/dev/conslog", O_WRONLY)                  = 256
fcntl(256, F_SETFD, 0x00000001)                 = 0
time()                                          = 828665429
open("/usr/share/lib/zoneinfo/US/Central", O_RDONLY) = 257
read(257, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192)   = 817
close(257)                                      = 0
open("/etc/syslog.pid", O_RDONLY)               = 257
fcntl(257, F_SETFD, 0x00000001)                 = 0
fcntl(257, F_SETLK, 0xEFFFEB8C)                 Err#11 EAGAIN
putmsg(256, 0xEFFFEC30, 0xEFFFEC24, 0)          = 0
httpd: could not get socket
write(2, " h t t p d :   c o u l d".., 28)      = 28
socketwrite(2, " s o c k e t", 6)                       = 6
: write(2, " :  ", 2)                           = 2
Resource temporarily unavailablewrite(2, " R e s o u r c e   t e m".., 32)
= 32

write(2, "\n", 1)                               = 1
lseek(0, 0, SEEK_CUR)                           = 144642
_exit(1)

-- 
Sameer Parekh					Voice:   510-601-9777x3
Community ConneXion, Inc.			FAX:     510-601-9734
The Internet Privacy Provider			Dialin:  510-658-6376
http://www.c2.net/ (or login as "guest")		sameer@c2.net