Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fcgiwrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ int main(int argc, char **argv)
{
int nchildren = 1;
char *socket_url = NULL;
int fd = 0;
int fd = -1;
int c;

while ((c = getopt(argc, argv, "c:hfs:p:")) != -1) {
Expand Down Expand Up @@ -865,12 +865,15 @@ int main(int argc, char **argv)
if (fd < 0) {
return 1;
}
} else {
fprintf(stderr, "No socket to listen on\n");
return 1;
}

prefork(nchildren);
fcgiwrap_main();

if (fd) {
if (fd >= 0) {
const char *p = socket_url;
close(fd);

Expand Down