public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denis Vlasenko <vda@ilport.com.ua>
To: Stefan Seyfried <seife@suse.de>
Cc: linux-kernel@vger.kernel.org, christiand59@web.de
Subject: Re: /dev/stderr gets unlinked 8]
Date: Wed, 15 Mar 2006 15:30:57 +0200	[thread overview]
Message-ID: <200603151530.57624.vda@ilport.com.ua> (raw)
In-Reply-To: <20060315110252.GB31317@suse.de>

On Wednesday 15 March 2006 13:02, Stefan Seyfried wrote:
> On Tue, Mar 14, 2006 at 03:35:57PM +0200, Denis Vlasenko wrote:
>  
> > Mysql people are strange. For example, their daemon does not want to die
> > on SIGTERM, this makes it harder to run it under daemontools.
> 
> Well, daemontools are equally strange ;-))

IMHO the most sane way to control zillions of background processes.

> > Also it drops privileges BEFORE it opens logfiles (--log=xxx).
> > I cannot get it to log stuff on stderr:
> > 
> > echo "* Starting mysqld"
> > env - \
> > setuidgid root \
> > mysqld \
> >     --defaults-file="$PWD/my.cnf" \
> >     --user="$user" \
> >     --datadir="$var/data" \
> >     --tmpdir="$var/tmp" \
> >     --socket="$PWD/mysql.socket" \
> >     --pid-file="$PWD/mysql.pid" \
> >     --skip-name-resolve \
> >     --skip-innodb \
> >     --skip-ndbcluster \
> >     --skip-networking \
> >     --log=/proc/self/fd/2 \
> >     --log-slow-queries=/proc/self/fd/2 \
> > 
> > Those last two options don't work:
> > 
> > mysqld: File '/proc/self/fd/2' not found (Errcode: 13)
> 
> any good daemon closes stdout, stderr, stdin and does chdir(/) on startup.
> msqld might do so as well.

No. Good daemon (e.g. apache does it) will open log file first, and _then_
will do setuid($user). Mysql tries to do it in opposite order, and (no wonder)
fails to open the log.
--
vda

  parent reply	other threads:[~2006-03-15 13:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14 10:12 /dev/stderr gets unlinked 8] Denis Vlasenko
2006-03-14 13:07 ` Aurelien Degremont
2006-03-14 13:11   ` Denis Vlasenko
2006-03-14 13:11 ` Christian
2006-03-14 13:35   ` Denis Vlasenko
2006-03-15 11:02     ` Stefan Seyfried
2006-03-15 13:14       ` Andreas Schwab
2006-03-15 13:34         ` Denis Vlasenko
2006-03-15 14:23           ` linux-os (Dick Johnson)
2006-03-16  8:07             ` Denis Vlasenko
2006-03-16 20:11         ` Jan Engelhardt
2006-03-17  6:34           ` Denis Vlasenko
2006-03-17 14:32             ` Jan Engelhardt
2006-03-17 15:40               ` linux-os (Dick Johnson)
2006-03-15 13:30       ` Denis Vlasenko [this message]
     [not found] <5QeND-31x-7@gated-at.bofh.it>
     [not found] ` <5QE55-6Td-9@gated-at.bofh.it>
     [not found]   ` <5R778-8fs-29@gated-at.bofh.it>
     [not found]     ` <5RgN2-5fi-3@gated-at.bofh.it>
     [not found]       ` <5RohF-7Oe-3@gated-at.bofh.it>
     [not found]         ` <5Rpnz-ZJ-39@gated-at.bofh.it>
2006-03-19  1:07           ` Bodo Eggert
2006-03-19 16:57             ` Joshua Hudson

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=200603151530.57624.vda@ilport.com.ua \
    --to=vda@ilport.com.ua \
    --cc=christiand59@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seife@suse.de \
    /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