On Tue, Oct 30, 2012 at 8:36 AM, Enlightenment SVN < no-re...@enlightenment.org> wrote:
> Log: > e: add gdb support to enlightenment_sys to work around Ubuntu crappy > kernel patch. > > > Author: cedric > Date: 2012-10-30 01:36:26 -0700 (Tue, 30 Oct 2012) > New Revision: 78640 > Trac: http://trac.enlightenment.org/e/changeset/78640 > > Modified: > trunk/e/data/etc/sysactions.conf.in trunk/e/src/bin/e_sys_main.c > > Modified: trunk/e/data/etc/sysactions.conf.in > =================================================================== > --- trunk/e/data/etc/sysactions.conf.in 2012-10-30 08:32:11 UTC (rev > 78639) > +++ trunk/e/data/etc/sysactions.conf.in 2012-10-30 08:36:26 UTC (rev > 78640) > @@ -50,6 +50,7 @@ > action: /bin/mount /bin/mount > action: /bin/umount /bin/umount > action: /usr/bin/eject /usr/bin/eject > +action: gdb gdb > > # on FreeBSD use this instead of the above. > #action suspend /usr/sbin/zzz > > Modified: trunk/e/src/bin/e_sys_main.c > =================================================================== > --- trunk/e/src/bin/e_sys_main.c 2012-10-30 08:32:11 UTC (rev 78639) > +++ trunk/e/src/bin/e_sys_main.c 2012-10-30 08:36:26 UTC (rev 78640) > @@ -44,11 +44,13 @@ > int i, gn; > int test = 0; > char *action = NULL, *cmd; > + char *output = NULL; > #ifdef HAVE_EEZE_MOUNT > Eina_Bool mnt = EINA_FALSE; > const char *act; > #endif > gid_t gid, gl[65536], egid; > + int pid; > > for (i = 1; i < argc; i++) > { > @@ -70,6 +72,20 @@ > test = 1; > action = argv[2]; > } > + else if ((argc == 4) && (!strcmp(argv[1], "gdb"))) > + { > + char *end = NULL; > + > + action = argv[1]; > + pid = strtoul(argv[2], &end, 10); > + if (end == NULL || *end != '\0') > + { > + printf("Invalid pid for '%s'.\n", argv[3]); > + exit(0); > + } > + > + output = argv[3]; > + } errno should be checked here ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel