[SunRay-Users] Ubuntu 9.10 - 2 days to go

Jens Langner J.Langner at fzd.de
Thu Oct 29 11:16:26 EET 2009


Hi Bob,

Bob Doolittle schrieb:

> Good news - this bug was already found and has been fixed for SRSS
> 4.2/SRS 5.

good to hear that. Looking forward to the final SRSS4.2 version.

However, I just found another minor bug in one of SRSS 4.2's shell
files. This time in the
/opt/SUNWut/lib/prototype/Xsetup.SUNWut.prototype file around line 280
where via "ps" the command is queried and written to the session_proc file.

In the original file the following ps command sequence is used:

-- cut here --
  /bin/ps -p $PPID -o comm | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
-- cut here --

So "-o comm" is used. However, on Linux the output of "-o comm" is
slightly different. First it will output the command without it's full
path and it will also truncate the output after 15 characters.

So to stay compatible to the way solaris is writing the session command
into the session_proc file one have to use "-o cmd" instead on linux and
then cut out the first word of the answer of the ps command.

Here I have solved that situation with the following statements in Xsetup:

-- cut here --
if [ `uname` = "Linux" ]
then
  /bin/ps -p $PPID -o cmd | \
  /usr/bin/cut -d ' ' -f 1 | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
else
  /bin/ps -p $PPID -o comm | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
fi
-- cut here --

That way the session_proc file has the very same output/content on Linux
and Solaris, which IMHO seems to be quite important.

regards,
jens
-- 
Jens Langner                                         Ph: +49-351-2602757
Forschungszentrum Dresden-Rossendorf e.V.
Institute of Radiopharmacy - PET Center                 J.Langner at fzd.de
Germany                                               http://www.fzd.de/


More information about the SunRay-Users mailing list