Dr. Werner Fink changed bug 1002492
What Removed Added
CC   jdelvare@suse.com
Flags   needinfo?(jdelvare@suse.com)

Comment # 10 on bug 1002492 from
(In reply to Jean Delvare from comment #8)

I do not see the problem ... it is a warning, that is it:

/* Gets the parent's pid of the parent. */
static pid_t getsession(const pid_t pid)
{
    pid_t session = getsid(pid);
    if ((long)session < 0) {
        warn("can not get session id for process %ld!\n", (long)pid);
        session = 1;
    }
    return session;
}

beside this is stderr is a valid terminal then stderr is used:

/* write to syslog file if not open terminal */
static void nsyslog(int pri, const char *fmt, va_list args)
{
    extension char newfmt[strlen(we_are)+2+strlen(fmt)+1];

    strcat(strcat(strcpy(newfmt, we_are), ": "), fmt);

    /* file descriptor of stderr is 2 in most cases */
    if (ttyname(fileno(stderr)) == NULL)
        vsyslog(pri, newfmt, args);
    else
        vfprintf(stderr, newfmt, args);
}


You are receiving this mail because: