From: malc <av1474@comtv.ru>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: "\"Ricardo Catalinas Jiménez\"" <jimenezrick@gmail.com>,
caml-list@inria.fr
Subject: Re: [Caml-list] Unix.getlogin () fails when stdin is redirected
Date: Wed, 21 Mar 2012 21:59:54 +0400 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1203212159050.1520@linmac> (raw)
In-Reply-To: <21e18417ea60387375a493c44907735e.squirrel@gps.dynxs.de>
On Wed, 21 Mar 2012, Gerd Stolpmann wrote:
>
> > On Tue, 20 Mar 2012, Ricardo Catalinas Jim?nez wrote:
> >
> >> I found out the next issue in this simple code:
> >>
> >> let () =
> >> print_endline "Hello";
> >> print_endline (Unix.getlogin ())
> >>
> >> Running in the normal case, with `./a.out' gives:
> >
> > FWIW on my machine (linux) calling getlogin from any PTY always fails
> > (be it screen or some sort of X terminal)
>
> I guess /var/run/utmp is not world-readable - which is a perfectly
> reasonable configuration, and means that you disabled getlogin
> administratively.
>
> Does "last -f /var/run/utmp" give an output?
Yep
~$ last -f /var/run/utmp
malc tty1 Wed Mar 21 21:57 still logged in
reboot system boot Wed Mar 21 21:57 (00:01)
utmp begins Wed Mar 21 21:57:23 2012
~$ ls -l /var/run/utmp
-rw-r--r-- 1 root root 3840 2012-03-21 21:57 /var/run/utmp
[..snip..]
--
mailto:av1474@comtv.ru
prev parent reply other threads:[~2012-03-21 18:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 17:51 Ricardo Catalinas Jiménez
2012-03-20 18:07 ` [Caml-list] " Ricardo Catalinas Jiménez
2012-03-20 18:28 ` David House
2012-03-20 18:48 ` Till Varoquaux
2012-03-20 19:41 ` Yaron Minsky
2012-03-20 20:12 ` Till Varoquaux
2012-03-20 22:45 ` oliver
2012-03-21 12:26 ` Török Edwin
2012-03-21 2:17 ` [Caml-list] " malc
2012-03-21 11:29 ` Gerd Stolpmann
2012-03-21 17:59 ` malc [this message]
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=alpine.LNX.2.00.1203212159050.1520@linmac \
--to=av1474@comtv.ru \
--cc=caml-list@inria.fr \
--cc=info@gerd-stolpmann.de \
--cc=jimenezrick@gmail.com \
/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