librelist archives

« back to archive

Minor documentation error?

Minor documentation error?

From:
Matt Towers
Date:
2011-01-12 @ 22:33
In section 4.5.1 The Python Examples 
(http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-470004.5.1)

Source 21:  Run Script For Chat Demo

According to the bullet point #3 immediately following the source, I think
the line:

python -u chat.py 2>&1 > chat.log &

should actually be:

nohup python -u chat.py 2>&1 > chat.log & 

Cheers!

✈ Matt


Re: [mongrel2] Minor documentation error?

From:
Zed A. Shaw
Date:
2011-01-12 @ 22:47
On Wed, Jan 12, 2011 at 02:33:09PM -0800, Matt Towers wrote:
> In section 4.5.1 The Python Examples 
(http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-470004.5.1)
> 
> Source 21:  Run Script For Chat Demo
> 
> According to the bullet point #3 immediately following the source, I 
think the line:

Yes, nohup seems to be rather random so it's not included but probably
should have a notice about it.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Minor documentation error?

From:
Erich Heine
Date:
2011-01-15 @ 18:11
On Wed, Jan 12, 2011 at 4:47 PM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:

> On Wed, Jan 12, 2011 at 02:33:09PM -0800, Matt Towers wrote:
> > In section 4.5.1 The Python Examples (
> http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-470004.5.1)
> >
> > Source 21:  Run Script For Chat Demo
> >
> > According to the bullet point #3 immediately following the source, I
> think the line:
>
> Yes, nohup seems to be rather random so it's not included but probably
> should have a notice about it.
>
>
Another minor issue along these lines.

The command really should be:

nohup cmd > output_redir 2>&1 &

Depending on the shell, this is different than the currently documented
pattern of:

nohup cmd 2>&1 >output_redir &

This is because of order of assignment issues [1]. It is a bit wonky I know,
but at least for me, with the former, trying to start procer with a remote
ssh command works (no login shell), while the latter fails with "not a tty"
errors.

[1] Baically file descriptors in sh are like pointers. So if you first need
to point 1 at a new file, then point 2 at the same thing as ("address of")
fd 1. This is annoying and the cause of an ungodly amound of subtle bugs,
because most shell stuff is not quite so positionally dependent, and these
cases feel declarative not "sets of ops" anyway.