pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:224: Inside #if constant(Stdio.__HAVE_SEND_FD__)
   ForkdEncoder(process_fd));    data = sprintf("%4c%s", sizeof(data), data);    // Wait for forkd to acknowledge the process_fd.    if (process_fd->read(4) != "\0\0\0\0") {    process_fd->close();    process_fd = UNDEFINED;    error("Failed to create spawn request.\n");    }    int bytes = process_fd->write(data);    if (bytes != sizeof(data)) { +  int fd_errno = process_fd->errno();    process_fd->close();    process_fd = UNDEFINED; -  error("Failed to write spawn request (%d != %d).\n", -  bytes, sizeof(data)); +  error("Failed to write spawn request (%d != %d, errno: %d, errmsg: %s).\n", +  bytes, sizeof(data), fd_errno, strerror(fd_errno) || "?");    }    process_backend = Pike.SmallBackend();    process_backend->add_file(process_fd);    process_fd->set_nonblocking(got_data, UNDEFINED, got_close);       // Wait for the process to fork (or fail).    while (__status == -1) {    process_backend(3600.0);    }