[Linux-ia64] getlogin problem

From: Donny Cooper <dcooper_at_hstc.necsyl.com>
Date: 2001-06-02 05:34:01
Hello,

Below is a small test that shows a getlogin problem.

Please review the following session. The getlogin does not
return username if the code is executed in a script with background
command, but returns correctly when run in foreground.

Note: below test uses ecc (Intel Compiler), gcc compiler yields
same results. 

This works correctly in 000828 with 2.4.0-test10 kernel.
 
Any ideas?

Thanks.

Donny
NEC Systems, Inc.

--- Begin Test Case -----------------
Failed Environments:
TurboLinux Beta2-R1 w/ 2.4.0-010109-61 kernel on Lion system
TurboLinux Beta2-R1 w/ 2.4.3-AzusA kernel on AzusA system 
TurboLinux Beta3    w/ 2.4.3-010405 kernel on Lion system

[aamin@lion]$ cat getlogin.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main()
{
char *s;
s=malloc(32);
s=getlogin();
printf("arvind login %s \n",s);
}

[aamin@lion]$ ecc -o getlogin getlogin.c

[aamin@lion]$ cat test.csh
#!/bin/csh
./getlogin &

[aamin@lion]$ ./getlogin
arvind login aamin

[aamin@lion]$ test.csh
[1] 15977
[aamin@lion]$ arvind login (null)
 
--- End Test Case -------------------

-----------------------------------
Donny Cooper
NEC Systems, Inc.
Advanced Technical Computing Center
dcooper@atcc.necsyl.com
http://www.necservers.com
----------------------------------- 
Received on Fri Jun 01 12:33:57 2001

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:04 EST