After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 602289 - gdk_spawn_on_screen(_with_pipes) uses gint for pid
gdk_spawn_on_screen(_with_pipes) uses gint for pid
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.90.x
Other All
: Normal minor
: 3.0
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-18 11:08 UTC by Nick Schermer
Modified: 2010-06-15 23:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint (4.98 KB, patch)
2010-06-06 13:44 UTC, Javier Jardón (IRC: jjardon)
needs-work Details | Review
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint.v2 (4.98 KB, patch)
2010-06-06 20:40 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Nick Schermer 2009-11-18 11:08:36 UTC
Instead it should use GPid I think, maybe something for the 2.90/3.0 overhaul?
Comment 1 Tor Lillqvist 2009-11-18 11:28:18 UTC
True, but the only platform where GPid is not an int is Windows, and on Windows there is just one screen (in the X11/GDK sense, I don't mean "monitor") anyway. So it doesn't matter that much.
Comment 2 Nick Schermer 2010-06-06 13:27:45 UTC
Bump.
Comment 3 Javier Jardón (IRC: jjardon) 2010-06-06 13:44:40 UTC
Created attachment 162866 [details] [review]
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint
Comment 4 Matthias Clasen 2010-06-06 16:22:44 UTC
Comment on attachment 162866 [details] [review]
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint

Patch will not even compile, since it has 'GInt' types in it...
Comment 5 Javier Jardón (IRC: jjardon) 2010-06-06 20:40:34 UTC
Created attachment 162885 [details] [review]
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint.v2

Sorry, here the correct patch
Comment 6 Nick Schermer 2010-06-09 18:46:59 UTC
Looks fine to me.
Comment 7 Javier Jardón (IRC: jjardon) 2010-06-10 02:40:33 UTC
Comment on attachment 162885 [details] [review]
Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint.v2

commit 71c501d895104d568061a4d0a55c883a9663eb89
Comment 8 Javier Jardón (IRC: jjardon) 2010-06-10 02:41:04 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 9 Martin Schlemmer 2010-06-12 14:21:31 UTC
The change is needed in gdkspawn.h as well ...
Comment 10 Tor Lillqvist 2010-06-12 18:43:23 UTC
Mostly pointless bug, as gdk_spawn_on_screen() is quite Unix-specific anyway, and on Unix a pid is, afaik, always an int. Did you read the comment in front of the GPid typedef in glibconfig.h? It says:

/* A GPid is an abstraction for a process "handle". It is *not* an
 * abstraction for a process identifier in general. GPid is used in
 * GLib only for descendant processes spawned with the g_spawn*
 * functions. On POSIX there is no "process handle" concept as such,
 * but on Windows a GPid is a handle to a process, a kind of pointer,
 * not a process identifier.
 */
Comment 11 Martin Schlemmer 2010-06-13 12:20:16 UTC
Not sure who you are talking to Tor, and tbh, I don't care about this except for the fact that it breaks building on win32:

gdkspawn-win32.c:30:1: error: conflicting types for 'gdk_spawn_on_screen'
../../gdk/gdkspawn.h:33:10: note: previous declaration of 'gdk_spawn_on_screen' was here
gdkspawn-win32.c:54:1: error: conflicting types for 'gdk_spawn_on_screen_with_pipes'
../../gdk/gdkspawn.h:43:10: note: previous declaration of 'gdk_spawn_on_screen_with_pipes' was here


So revert or change the header, I'm just letting people know this breaks things, and not interested in the artistic/whatever motivations.
Comment 12 Javier Jardón (IRC: jjardon) 2010-06-15 15:18:13 UTC
@Martin:

committed the fix in f62e000be492deb83f8544b29265f25d00eab934
Comment 13 Martin Schlemmer 2010-06-15 17:44:50 UTC
I did not want to sound rude btw. - just wanted to clarify that I'm only reporting the issue that the commit caused for me, and did not want to give an opinion about the change.
Comment 14 Javier Jardón (IRC: jjardon) 2010-06-15 23:49:51 UTC
@Martin: Sure, thanks for notifiyng