[Bsd-sharp-cvs] CVS commit to
/cvsroot/bsd-sharp/FreeBSD-ports/multimedia/gnome-subtitles/files
by killfill
noreply at forge.novell.com
noreply at forge.novell.com
Mon Mar 26 17:43:12 MDT 2007
CVS commit to /cvsroot/bsd-sharp/FreeBSD-ports/multimedia/gnome-subtitles/files by killfill
Modified Files:
patch-src-GnomeSubtitles-Execution-Executable.cs
Log Message:
Handle SetProcessName
===================================================================
RCS file: /cvsroot/bsd-sharp/FreeBSD-ports/multimedia/gnome-subtitles/files/patch-src-GnomeSubtitles-Execution-Executable.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /cvsroot/bsd-sharp/FreeBSD-ports/multimedia/gnome-subtitles/files/patch-src-GnomeSubtitles-Execution-Executable.cs 2007/03/24 21:53:27 1.1
+++ /cvsroot/bsd-sharp/FreeBSD-ports/multimedia/gnome-subtitles/files/patch-src-GnomeSubtitles-Execution-Executable.cs 2007/03/26 23:43:12 1.2
@@ -1,11 +1,22 @@
---- src/GnomeSubtitles/Execution/Executable.cs.orig Sun Mar 4 00:24:15 2007
-+++ src/GnomeSubtitles/Execution/Executable.cs Sun Mar 11 15:37:55 2007
-@@ -38,7 +38,7 @@
+--- src/GnomeSubtitles/Execution/Executable.cs.orig Sat Mar 24 10:00:34 2007
++++ src/GnomeSubtitles/Execution/Executable.cs Sat Mar 24 10:01:34 2007
+@@ -26,15 +26,11 @@
+ public class Executable {
+
+ [DllImport("libc")]
+- private static extern int prctl(int option, byte [] arg2, ulong arg3,
+- ulong arg4, ulong arg5);
++ private static extern void setproctitle(byte [] fmt, byte [] str_arg);
+
+- public static void SetProcessName(string name) {
+- if(prctl(15 /* PR_SET_NAME */, Encoding.ASCII.GetBytes(name + "\0"), 0, 0, 0) != 0) {
+- throw new ApplicationException("Error setting process name: " +
+- Mono.Unix.Native.Stdlib.GetLastError());
+- }
+- }
++ public static void SetProcessName(string name) {
++ setproctitle(Encoding.ASCII.GetBytes("%s\0"), Encoding.ASCII.GetBytes(name + "\0"));
++ }
public static void Main (string[] args) {
ExecutionInfo.Args = args;
-- SetProcessName(ExecutionInfo.ExecutableName);
-+// SetProcessName(ExecutionInfo.ExecutableName);
- Global.Run();
- }
-
More information about the Bsd-sharp-cvs
mailing list