Your message dated Sun, 23 Feb 2014 22:26:49 +1100
with message-id <[email protected]>
and subject line Re: Bug#739856: procps: "pwdx $$" doesn't work: pwdx thinks 
that $$ is not a valid integer
has caused the Debian Bug report #739856,
regarding procps: "pwdx $$" doesn't work: pwdx thinks that $$ is not a valid 
integer
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
739856: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739856
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: procps
Version: 1:3.3.3-3
Severity: normal

What I do:

  I type "pwdx $$".

What I expect to happen:

  I expect pwdx to print the current working directory of my shell.

What actually happens:

  pwdx prints a message such as the following:

    pwdx: invalid process id: 18110

  The number is variable; it depends on the value of $$, of course;
  but the remainder of the message is always the same.

Further details:

  I make use of two PCs.  The above problem occurs on one of them
  (named albatross, the PC from which I am making this bug report),
  but not on the other.

Solution:

  I looked at the source code of pwdx, specifically, at the file pwdx.c
  in the Debian source package.  It is clear that there is a bug in the
  function check_pid_argument.

  That function calls strtol, in order to check that a certain string
  is a valid integer.  It then checks the value of errno.

  I have determined that, on albatross, errno has the value 2 before the
  call to strtol.  Therefore, the check of errno that follows the call to
  strtol concludes, mistakenly, that the string is not a positive integer.

  The fix for this is given in the man page for strtol.  To quote:

    the calling program should set errno to 0 before the call, and
    then determine if an error occurred by checking whether errno has
    a nonzero value after the call.

-- System Information:
Debian Release: 7.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_IE.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages procps depends on:
ii  initscripts   2.88dsf-41+deb7u1
ii  libc6         2.13-38+deb7u1
ii  libncurses5   5.9-10
ii  libncursesw5  5.9-10
ii  libprocps0    1:3.3.3-3
ii  libtinfo5     5.9-10
ii  lsb-base      4.1+Debian8+deb7u1

Versions of packages procps recommends:
ii  psmisc  22.19-1+deb7u1

procps suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Package: procps
Version: 1:3.3.9-1

On Sun, Feb 23, 2014 at 10:30:46AM +0000, Ronan wrote:
>   pwdx prints a message such as the following:
> 
>     pwdx: invalid process id: 18110
Hi Ronan,
  This is a duplicate of Debian bug 718766 which was fixed in procps 
3.3.9-1 The patch by Colin made it into the upstream patch at
https://gitorious.org/procps/procps/commit/26ae657950272439be23e02057debf5d83265436

 - Craig
-- 
Craig Small (@smallsees)   http://enc.com.au/       csmall at : enc.com.au
Debian GNU/Linux           http://www.debian.org/   csmall at : debian.org
GPG fingerprint:        5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

--- End Message ---

Reply via email to