[GRASS-dev] [bug #4757] (grass) lib/gis/done_msg.c fails

Glynn Clements glynn at gclements.plus.com
Wed Jun 28 13:12:07 EDT 2006


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=4757
> -------------------------------------------------------------------------
> 
> Subject: lib/gis/done_msg.c fails
> 
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> 
> Hi,
> 
> both getlogin() and G_whoami() fail in lib/gis/done_msg.c.
> It is not clear to me why these functions are needed at all.

I suspect that it's to handle the situation where you start a job in
the background, log out, someone else logs in, your background job
completes and writes the completion message to the terminal.

This doesn't actually work on Linux, but I can't find any
documentation which addresses this situation. There isn't any
fundamental reason why a process which has a descriptor for the
terminal can't continue to use the terminal after you've logged out.

The code in G_done_msg() checks whether the user running the process
(as determined by G_whoami()) is the same as the user who is listed in
the utmp file as being logged in on the terminal.

IMHO, getting rid of that check is unlikely to have any adverse
consequences in real use.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list