All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Brabec <sbrabec@suse.cz>
To: util-linux@vger.kernel.org
Subject: [PATCH 0/3] script: no logging for non-interactive shells
Date: Tue, 10 Feb 2015 22:30:35 +0100	[thread overview]
Message-ID: <54DA787B.4090205@suse.cz> (raw)

Many people use script in their shell initialization files. It has some 
unwanted consequences, e. g. logging commands from cron (and starting 
them in a pseudo-terminal and interactive shell). It could also result 
in a seemingly hanging applications:

For example:

echo -e './script\nTERM=linux mutt' | \
   at $(date -d "+1 minute 5 seconds" +%H:%M)

mutt will "hang" inside at, because it thinks that it is running in an 
interactive shell and waits for input.

That is why I wrote --interactive command line option. If it is set, 
script called from a non-interactive session will not log anything, just 
(optionally) execute -c argument and silently exit.

Note that similar behavior existed between f50473e and 3822032, but the 
new proposed behavior does not generate error.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@suse.cz
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                 fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76

             reply	other threads:[~2015-02-10 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 21:30 Stanislav Brabec [this message]
2015-02-11 10:05 ` [PATCH 0/3] script: no logging for non-interactive shells Karel Zak
2015-02-11 14:07   ` Stanislav Brabec
2015-02-12 13:31     ` Karel Zak

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=54DA787B.4090205@suse.cz \
    --to=sbrabec@suse.cz \
    --cc=util-linux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.