<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic &amp;quot;kill -0&amp;quot; to a process owned by a different user. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603872#M679808</link>
    <description>HP-UX 11.11/ PARISC&lt;BR /&gt;&lt;BR /&gt;I have a process [pid] owned by user AAA and I want to access  the pid   [kill -0 pid ] from another user BBB. &lt;BR /&gt;&lt;BR /&gt;I get a permission denied error when i tried it. Is there a way to get this "process access check" get working by any method??.&lt;BR /&gt;&lt;BR /&gt;I have a custom code which does this stuff and need to get a exit code zero for the program to go further.</description>
    <pubDate>Fri, 19 Mar 2010 10:59:33 GMT</pubDate>
    <dc:creator>skt_skt</dc:creator>
    <dc:date>2010-03-19T10:59:33Z</dc:date>
    <item>
      <title>"kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603872#M679808</link>
      <description>HP-UX 11.11/ PARISC&lt;BR /&gt;&lt;BR /&gt;I have a process [pid] owned by user AAA and I want to access  the pid   [kill -0 pid ] from another user BBB. &lt;BR /&gt;&lt;BR /&gt;I get a permission denied error when i tried it. Is there a way to get this "process access check" get working by any method??.&lt;BR /&gt;&lt;BR /&gt;I have a custom code which does this stuff and need to get a exit code zero for the program to go further.</description>
      <pubDate>Fri, 19 Mar 2010 10:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603872#M679808</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2010-03-19T10:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603873#M679809</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Instead of testing the pid with 'kill -0' I would suggest a simple interrogation with 'ps':&lt;BR /&gt;&lt;BR /&gt;For example, by process name:&lt;BR /&gt;&lt;BR /&gt;# PIDS=$(UNIX95= ps -C myprocess -opid=)&lt;BR /&gt;&lt;BR /&gt;#  [ -z "${PIDS}" ] &amp;amp;&amp;amp; echo "dead" || echo "alive"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Mar 2010 11:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603873#M679809</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-19T11:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603874#M679810</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;#-------------------&lt;BR /&gt;PID=other_user_pid_no&lt;BR /&gt;test=`ps -e | awk '{print $1}' |grep $PID`&lt;BR /&gt;&lt;BR /&gt;if [ "$test" != "$PID" ] ; then echo "We can not test the validity of $PID.";&lt;BR /&gt; exit 1; &lt;BR /&gt;else &lt;BR /&gt;# whatever...&lt;BR /&gt; exit 0;&lt;BR /&gt;fi&lt;BR /&gt;#-------------------&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Horia.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Mar 2010 12:28:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603874#M679810</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-03-19T12:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603875#M679811</link>
      <description>HI (again):&lt;BR /&gt;&lt;BR /&gt;Too, if you know the pid and don't want to fiddle with the process name, you could do:&lt;BR /&gt;&lt;BR /&gt;# PID=$(UNIX95= ps -p 1234 -opid=)&lt;BR /&gt;&lt;BR /&gt;# [ -z "${PID}" ] &amp;amp;&amp;amp; echo "dead" || echo "alive"&lt;BR /&gt;&lt;BR /&gt;Obviously, substitute the actual pid in question for the "1234" value.&lt;BR /&gt;&lt;BR /&gt;Once again, we leverage the UNIX95 behavior of 'ps' to create a custom output of *only* the pid *if* the pid can in fact be found.  The '-opid=' says that the output should be the pid and that the normal 'ps' header line should be suppressed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 19 Mar 2010 12:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603875#M679811</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-19T12:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603876#M679812</link>
      <description>I am not lloking for a code modify, rather any other possible changes we could get the same thing working.some unix tricks such as setuid, sticky bit , acl ...</description>
      <pubDate>Fri, 19 Mar 2010 13:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603876#M679812</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2010-03-19T13:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603877#M679813</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I am not lloking for a code modify, rather any other possible changes we could get the same thing working.some unix tricks such as setuid, sticky bit , acl &lt;BR /&gt;&lt;BR /&gt;Then create a 'setuid' executable that runs with an effective uid of zero.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 19 Mar 2010 13:52:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603877#M679813</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-19T13:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603878#M679814</link>
      <description>&lt;!--!*#--&gt;kill -0 tests if you may send a signal to the target process. If you are not the owner of the process or root, the answer will always be "no".&lt;BR /&gt;&lt;BR /&gt;If you have the PID and just want to know if the process exists or not, you should use the ps command with the -p option. If you want only the information about the existence of the process, throw the ps output away and use only the result code returned by the ps command.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;pid=1       # or whatever&lt;BR /&gt;&lt;BR /&gt;if ps -p $pid &amp;gt;/dev/null; then&lt;BR /&gt;    echo "process $pid exists"&lt;BR /&gt;else&lt;BR /&gt;    echo "process $pid does not exist"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Fri, 19 Mar 2010 13:58:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603878#M679814</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-03-19T13:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: "kill -0" to a process owned by a different user.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603879#M679815</link>
      <description>&amp;gt;Then create a 'setuid' executable that runs with an effective uid of zero.&lt;BR /&gt;&lt;BR /&gt;... or with the uid corresponding to user BBB.&lt;BR /&gt;&lt;BR /&gt;Horia.</description>
      <pubDate>Mon, 22 Mar 2010 06:15:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-kill-0-quot-to-a-process-owned-by-a-different-user/m-p/4603879#M679815</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-03-22T06:15:10Z</dc:date>
    </item>
  </channel>
</rss>

