<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Changing process name in Mono</title>
	<atom:link href="http://abock.org/2006/02/09/changing-process-name-in-mono/feed/" rel="self" type="application/rss+xml" />
	<link>http://abock.org/2006/02/09/changing-process-name-in-mono/</link>
	<description></description>
	<lastBuildDate>Sun, 07 Mar 2010 08:30:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aaron Bockover</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-280</link>
		<dc:creator>Aaron Bockover</dc:creator>
		<pubDate>Sun, 12 Feb 2006 18:09:50 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-280</guid>
		<description>Mike: ah, yes. I remember doing that [improperly] for some signature a while ago. Thanks ;)

Mirco: that&#039;s what I mean by a combination of &#039;exec -a&#039; and prctl. &#039;exec -a&#039; does the argv[0] rename, which top, ps, gnome system monitor, and others will pick up and show in listings, while prctl actually renames the process, which killall and others will pick up. You have to do both to get the best coverage.</description>
		<content:encoded><![CDATA[<p>Mike: ah, yes. I remember doing that [improperly] for some signature a while ago. Thanks <img src='http://abock.org/wp-includes/images/smilies/face-wink.png' alt=';)' class='wp-smiley' /> </p>
<p>Mirco: that&#8217;s what I mean by a combination of &#8216;exec -a&#8217; and prctl. &#8216;exec -a&#8217; does the argv[0] rename, which top, ps, gnome system monitor, and others will pick up and show in listings, while prctl actually renames the process, which killall and others will pick up. You have to do both to get the best coverage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mirco Bauer</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-279</link>
		<dc:creator>Mirco Bauer</dc:creator>
		<pubDate>Sun, 12 Feb 2006 13:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-279</guid>
		<description>ups, didn&#039;t check that killall read /proc/foo/status instead of /proc/foo/cmdline., so ignore my previous comment ;)</description>
		<content:encoded><![CDATA[<p>ups, didn&#8217;t check that killall read /proc/foo/status instead of /proc/foo/cmdline., so ignore my previous comment <img src='http://abock.org/wp-includes/images/smilies/face-wink.png' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mirco Bauer</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-278</link>
		<dc:creator>Mirco Bauer</dc:creator>
		<pubDate>Sun, 12 Feb 2006 13:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-278</guid>
		<description>You can do the process rename much simpler with a shell script (which is neded anyhow for user friendly invokation):

exec -a myname mono foo.exe
echo done.

the script is not really portable which is not important since on windows you don&#039;t need this rename hack anyhow.</description>
		<content:encoded><![CDATA[<p>You can do the process rename much simpler with a shell script (which is neded anyhow for user friendly invokation):</p>
<p>exec -a myname mono foo.exe<br />
echo done.</p>
<p>the script is not really portable which is not important since on windows you don&#8217;t need this rename hack anyhow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Kestner</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-276</link>
		<dc:creator>Mike Kestner</dc:creator>
		<pubDate>Fri, 10 Feb 2006 15:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-276</guid>
		<description>It is pretty much _never_ correct to use ulong or long in a PInvoke signature.  I know you are just passing zeros, but on a 32 bit machine you are overflowing the expected parameter passing space for the method by 12 bytes.  YMMV.

The conventional way to pass a ulong parameter to the native side is to use an IntPtr which will vary in size the same way a long does on the native side.</description>
		<content:encoded><![CDATA[<p>It is pretty much _never_ correct to use ulong or long in a PInvoke signature.  I know you are just passing zeros, but on a 32 bit machine you are overflowing the expected parameter passing space for the method by 12 bytes.  YMMV.</p>
<p>The conventional way to pass a ulong parameter to the native side is to use an IntPtr which will vary in size the same way a long does on the native side.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymono</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-274</link>
		<dc:creator>anonymono</dc:creator>
		<pubDate>Fri, 10 Feb 2006 07:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-274</guid>
		<description>BTW: wouldn&#039;t it be nice to patch Mono so as to behave like this: by default, use this system call to put the name of the EXE file that holds the program that is running.</description>
		<content:encoded><![CDATA[<p>BTW: wouldn&#8217;t it be nice to patch Mono so as to behave like this: by default, use this system call to put the name of the EXE file that holds the program that is running.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymono</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-273</link>
		<dc:creator>anonymono</dc:creator>
		<pubDate>Fri, 10 Feb 2006 07:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-273</guid>
		<description>&lt;em&gt;Ideally the low-level, system-specific calls will be implemented in the Mono runtime in C, with a managed layer on top.&lt;/em&gt;

If there is already a bug in bugzilla about this particular feature request or you open a new one, post the URL here please.</description>
		<content:encoded><![CDATA[<p><em>Ideally the low-level, system-specific calls will be implemented in the Mono runtime in C, with a managed layer on top.</em></p>
<p>If there is already a bug in bugzilla about this particular feature request or you open a new one, post the URL here please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Bockover</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-272</link>
		<dc:creator>Aaron Bockover</dc:creator>
		<pubDate>Fri, 10 Feb 2006 01:14:35 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-272</guid>
		<description>No, you have to call something low-level, and that something is system-specific. Ideally the low-level, system-specific calls will be implemented in the Mono runtime in C, with a managed layer on top.</description>
		<content:encoded><![CDATA[<p>No, you have to call something low-level, and that something is system-specific. Ideally the low-level, system-specific calls will be implemented in the Mono runtime in C, with a managed layer on top.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymono</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-271</link>
		<dc:creator>anonymono</dc:creator>
		<pubDate>Fri, 10 Feb 2006 00:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-271</guid>
		<description>Could this be done with only managed code? If not, how could you do it multiplatform way? I suppose using #ifdef, am I right?</description>
		<content:encoded><![CDATA[<p>Could this be done with only managed code? If not, how could you do it multiplatform way? I suppose using #ifdef, am I right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Bockover</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-270</link>
		<dc:creator>Aaron Bockover</dc:creator>
		<pubDate>Thu, 09 Feb 2006 23:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-270</guid>
		<description>Right, I should have mentioned prctl is Linux-only. Other systems support similar calls however, and when we get this in Mono itself, it will account for that.

As for Banshee... yes, of course I handle a possible exception. However, Banshee is Linux only as well right now, mainly because of HAL. Banshee relies on other features that are mostly available on modern Linux systems, so chances are good you have a 2.6 kernel that post-dates Sept &#039;04.</description>
		<content:encoded><![CDATA[<p>Right, I should have mentioned prctl is Linux-only. Other systems support similar calls however, and when we get this in Mono itself, it will account for that.</p>
<p>As for Banshee&#8230; yes, of course I handle a possible exception. However, Banshee is Linux only as well right now, mainly because of HAL. Banshee relies on other features that are mostly available on modern Linux systems, so chances are good you have a 2.6 kernel that post-dates Sept &#8216;04.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Thorne</title>
		<link>http://abock.org/2006/02/09/changing-process-name-in-mono/comment-page-1/#comment-269</link>
		<dc:creator>Stephen Thorne</dc:creator>
		<pubDate>Thu, 09 Feb 2006 22:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://abock.org/2006/02/09/changing-process-name-in-mono/#comment-269</guid>
		<description>Awesome, I had a python module that would change sys.argv, but that only modifies /proc//cmdline, while killall looks at /proc//stat. This will allow me to stop having to use pkill -f, and go back to using killall :).

This feature was only added in September &#039;04, and is a linux kernel feature. I think that&#039;s an important thing to mention, because boxes running kernels without this feature may fall over on your media player, if you don&#039;t catch and handle that exception nicely. :)</description>
		<content:encoded><![CDATA[<p>Awesome, I had a python module that would change sys.argv, but that only modifies /proc//cmdline, while killall looks at /proc//stat. This will allow me to stop having to use pkill -f, and go back to using killall :).</p>
<p>This feature was only added in September &#8216;04, and is a linux kernel feature. I think that&#8217;s an important thing to mention, because boxes running kernels without this feature may fall over on your media player, if you don&#8217;t catch and handle that exception nicely. <img src='http://abock.org/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
