pkill kills self when called from C program

Bug #1446909 reported by Ben Greear
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
New
Undecided
Unassigned

Bug Description

This does not happen on Fedora. Source code example pasted below.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: procps 1:3.3.9-1ubuntu2.2
Uname: Linux 3.16.0-031600-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.14.1-0ubuntu3.10
Architecture: amd64
Date: Tue Apr 21 17:13:07 2015
InstallationDate: Installed on 2014-09-22 (211 days ago)
InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.3)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: procps
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.sysctl.conf: [modified]
mtime.conffile..etc.sysctl.conf: 2014-09-30T12:34:06.956063

Revision history for this message
Ben Greear (greearb) wrote :
Revision history for this message
Ben Greear (greearb) wrote :

I did some extra testing on this bug today.

I compiled and installed the latest procps-ng (3.3.10) on Ubuntu 14.04 i386,
and it sees the problem:

greearb@v-ubuntu-14-04-i386:~$ ./test-pkill
System command failed: ERROR: system command "pkill -f my-funky-cmdline" terminated with signal 15

 my-system rv: 15
greearb@v-ubuntu-14-04-i386:~$ pkill --version
pkill from procps-ng 3.3.10
greearb@v-ubuntu-14-04-i386:~$

But, exact same procps and test-pkill code works fine on Fedora-20:

[greearb@v-f20-32 ~]$ ./test-pkill
System command failed: ERROR: system command "pkill -f my-funky-cmdline" had return code: 1

 my-system rv: 256
[greearb@v-f20-32 ~]$ pkill --version
pkill from procps-ng 3.3.10
[greearb@v-f20-32 ~]$

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.