Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Gerd Stolpmann" <info@gerd-stolpmann.de>
To: "malc" <av1474@comtv.ru>
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 12:29:19 +0100	[thread overview]
Message-ID: <21e18417ea60387375a493c44907735e.squirrel@gps.dynxs.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1203210615050.4731@linmac>


> 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?

Gerd

> [..snip..]
>
> --
> mailto:av1474@comtv.ru
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>


-- 
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.



  reply	other threads:[~2012-03-21 11:29 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 [this message]
2012-03-21 17:59     ` malc

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=21e18417ea60387375a493c44907735e.squirrel@gps.dynxs.de \
    --to=info@gerd-stolpmann.de \
    --cc=av1474@comtv.ru \
    --cc=caml-list@inria.fr \
    --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