From: Luciano Miguel Ferreira Rocha <luciano@lsd.di.uminho.pt>
To: mariano_moreyra@aca.org.ar
Cc: 'Jorge Opaso Pazos' <jopaso@trofeospazos.com>,
linux-c-programming@vger.kernel.org
Subject: Re: Question!
Date: Thu, 4 Sep 2003 20:32:28 +0100 [thread overview]
Message-ID: <20030904193228.GA26061@lsd.di.uminho.pt> (raw)
In-Reply-To: <000401c37314$2c440020$0b04a8c0@aca.org.ar>
On Thu, Sep 04, 2003 at 03:41:36PM -0300, Mariano Moreyra wrote:
> The problem is that the child is waiting for the script to finish (the one
> that start mysqld) so the child sends a response to the client telling him
> that the script finished ok (or not).
Well, I don't know what safe_mysqld script is that. The one on my system
doesn't end.
Check that yours do, by running it on a normal console.
If it does end, then I have the following questions: are you closing the
socket after the pclose and/or exiting the child?
If so, then I guess your problem lies with popen. popen doesn't close
the other file descriptors, so the socket gets inherited. To see if that's
the true cause, start mysql through your interface and do a lsof -c mysql.
If the socket connection shows up, then you have to change your popen,
either by implementing it with pipe(2), fork(2), dup2(2), close(2), exec*
and _exit(2). Or by forking another child to do the close(sock); popen, etc.,
and use the exit status of that child for indication of success or failure.
Regards,
Luciano Rocha
next prev parent reply other threads:[~2003-09-04 19:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-03 18:19 Question! Mariano Moreyra
2003-09-03 21:09 ` Question! Jorge Opaso Pazos
2003-09-04 13:51 ` Question! Mariano Moreyra
2003-09-04 14:05 ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 14:28 ` Question! Mariano Moreyra
2003-09-04 16:04 ` Question! Jorge Opaso Pazos
2003-09-04 17:53 ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 18:41 ` Question! Mariano Moreyra
2003-09-04 19:32 ` Luciano Miguel Ferreira Rocha [this message]
2003-09-05 4:16 ` Question! Jorge Opaso Pazos
2003-09-05 14:58 ` Question! Mariano Moreyra
2003-09-04 14:01 ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 17:20 ` Question! Jorge Opaso Pazos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030904193228.GA26061@lsd.di.uminho.pt \
--to=luciano@lsd.di.uminho.pt \
--cc=jopaso@trofeospazos.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=mariano_moreyra@aca.org.ar \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).