Commit Graph

96 Commits

Author SHA1 Message Date
David Walter Seikel 96b9fe94e5 Fork'n'bitch is now operational.
TODO -
* Actually make the limits mean something.
* Clean up all that allocing and copying.  I'm sure I could make that better.


SVN revision: 19915
2006-01-20 04:42:35 +00:00
David Walter Seikel 29b4630756 Seperate the data event code from the fd handler code in preparation for
fork'n'bitch.


SVN revision: 19876
2006-01-17 11:33:39 +00:00
David Walter Seikel 0f5da34bce Commit API now, write code later.
Actually, this may turn into a can of worms, so comments would be useful.
Search for "can of worms" in ecore_exe.c for some commentary.  Personally,
I worry that we may have gone overboard, polling is bad 'mkay.


SVN revision: 19859
2006-01-16 13:21:52 +00:00
David Walter Seikel e754564803 Refactoring the exe exit stuff.
SVN revision: 19844
2006-01-16 03:20:36 +00:00
David Walter Seikel e109255415 More ecore_exe naming break'n'fix. Should be all done now.
SVN revision: 19832
2006-01-15 11:27:19 +00:00
David Walter Seikel 8ff26002a5 * ecore_exe events now get allocated just like other events.
* added ECORE_EXE_EVENT_ADD and support code.


SVN revision: 19758
2006-01-13 13:18:36 +00:00
David Walter Seikel d08ccf6fa6 Minor API breakage and fixage.
SVN revision: 19757
2006-01-13 06:38:44 +00:00
David Walter Seikel cf29de295c * Preperation before making the exe events consistant.
* Inlining a function that is only used once.
* More comments.


SVN revision: 19756
2006-01-13 04:31:41 +00:00
David Walter Seikel 2bc2ef0db6 Merged the two almost identical fd handlers.
SVN revision: 19703
2006-01-10 18:36:19 +00:00
David Walter Seikel 20a8865152 * fork'n'pipe now has stderr support.
* both exe run functions now use the same code.
* don't allocate pipes that wan't be used.  This made the code much cleaner.
* track and free the exe timers as needed.

E still reports a naughty null timer free at shutdown time, but I don't
think its in ecore_exe.  I'll valgrind it later.

The error fd handler is curently an identical copy of the read fd handler,
with only the names changed.  That's a big slab of code that is duplicated.
I'll merge the two into something generic next.

raster also mentioned that say the first ten lines or so of stderr should
be thrown into a dialog and shown to the user.  I don't know if there is a
way to do that from ecore, or if the user of ecore_exe has to do that
themselves.  The stderr support does line buffered mode just like the read
support, but has not been tested yet.  I'll test properly after the merge.


SVN revision: 19700
2006-01-10 16:46:07 +00:00
Carsten Haitzler dcd2b68e49 indenting...
SVN revision: 19689
2006-01-10 08:44:15 +00:00
Carsten Haitzler 12aa35dd99 fix up some warnings
SVN revision: 19563
2006-01-06 17:58:12 +00:00
Carsten Haitzler 5ba10bb385 symbol hiding fixes
SVN revision: 19556
2006-01-06 13:56:47 +00:00
David Walter Seikel a62dc114c7 Consistancy rules, 'mkay.
SVN revision: 19531
2006-01-04 20:53:07 +00:00
David Walter Seikel 2369a9c01e Damn typo.
SVN revision: 19529
2006-01-04 20:33:58 +00:00
David Walter Seikel ad6a5a6c70 The beginnings of an effort to make ecore_exe fork'n'pipe more consistant
with ecore_con and ecore_ipc.  Probably best to have all IPC methods work
the same way.


SVN revision: 19527
2006-01-04 20:28:12 +00:00
David Walter Seikel c990136eab * More robust method of checking if the fd's need to be closed.
* Minor preperation for respawn.


SVN revision: 19523
2006-01-04 16:29:36 +00:00
David Walter Seikel 5a4061bf1b Just another excuse to terminate those pesky exe's.
SVN revision: 19477
2006-01-01 21:20:42 +00:00
David Walter Seikel c06b7a851f If you terminate an exe, make sure it really is terminated.
Check it's pulse, hold a mirror to it's mouth, check for brain activity.

Pump another round or two into it, cut off it's head, put a stake through
it's heart.

Sprinkle holy water over it's corpse, hold a black mass to ask Lucifer if
it turned up in hell yet, consult the entrails of rasters three headed
chicken.

If all else fails, complain that the bitch is still alive, and stronger
measures will be needed.


SVN revision: 19475
2006-01-01 20:09:47 +00:00
David Walter Seikel b2bb84d0e8 Clean up.
SVN revision: 19432
2005-12-30 19:28:54 +00:00
David Walter Seikel 8bb13800f8 * exe exit event delay method changed.
* Added method to close an exe's stdin in a (probably) vain attempt to convince exe to exit.
* Other debugging shit.


SVN revision: 19430
2005-12-30 19:17:21 +00:00
David Walter Seikel f302260188 Generic errno checking.
SVN revision: 19282
2005-12-24 12:13:12 +00:00
David Walter Seikel f1ecb69e85 Make sure that the Last Words of a dead exe are preserved for future generations.
SVN revision: 19140
2005-12-19 05:07:58 +00:00
David Walter Seikel 6194429534 The fork'n'pipe knows line dancing!
Er, I mean line buffering.

It's slightly different from what raster wanted.  I'll update the example next.


SVN revision: 19063
2005-12-16 03:36:16 +00:00
Carsten Haitzler 7475ec3508 exe pipe example and other exe (no pipe) example. :)
SVN revision: 18951
2005-12-11 06:52:07 +00:00
David Walter Seikel ba872e4bf9 Turn off the write handler when not needed.
SVN revision: 18943
2005-12-11 00:11:12 +00:00
David Walter Seikel 7df068b625 Fork'n'pipe now actually pipes.
SVN revision: 18939
2005-12-10 22:39:51 +00:00
David Walter Seikel 3e30a7b8e5 Remove the kill_maybe that slipped in a while ago.
SVN revision: 18716
2005-11-29 22:22:21 +00:00
andyetitmoves 5af3e611c4 Attempt to speed up ecore_exe_run by seeing if there are any shell
metacharacters present in the command line passed. If there aren't any, parse
command line to arguments and pass to execvp instead of calling `sh -c' with the
entire command line. Hope we have covered all cases in which sh -c should be
necessarily invoked :) The current approach is pretty conservative though -
anything suspicious, and over to sh.


SVN revision: 18705
2005-11-29 12:39:09 +00:00
David Walter Seikel ea18787d33 Brain dead, quick'n'dirty pipe writer, Strictly for testing purposes.
SVN revision: 18402
2005-11-09 20:01:32 +00:00
David Walter Seikel 0bb989f1f6 Beginnings of fork'n'pipe.
Don't use ecore_exe_pipe_run() yet, it is not finished.  You can use
ecore_exe_pipe_write(), but it will do nothing.  I committed this
because someone wanted to play with it in it's current state.

ecore_exe_pipe_run() will startup your exe, and open the pipes that you
request, and everything should get cleaned up when the exe closes.  The
pipes are in the Ecore_Exe struct, you can use them.  The next thing I
will add will be proper use of the pipes.


SVN revision: 18400
2005-11-09 14:09:28 +00:00
David Walter Seikel 358badd6bf The pipes, the pipes are calling.
SVN revision: 17954
2005-10-25 07:30:29 +00:00
David Walter Seikel 2da426d72c Fleshed out the fork'n'pipe IPC a little more.
SVN revision: 17890
2005-10-24 14:47:25 +00:00
Carsten Haitzler b21a42f0f7 add more members and notes
SVN revision: 17878
2005-10-24 09:02:46 +00:00
Carsten Haitzler 909a56813f stubs and comments for implementing pipes to child wrappers
SVN revision: 17876
2005-10-24 08:53:50 +00:00
sebastid 22f22e79d7 No return value.
SVN revision: 17157
2005-10-04 11:35:50 +00:00
Carsten Haitzler ea6d0fb19c allow tagging of exe's
SVN revision: 17032
2005-09-28 13:09:09 +00:00
sebastid 034842d3d9 Included in ecore_private.h
SVN revision: 16625
2005-09-06 23:10:24 +00:00
sebastid 19d9aa1452 Move Ecore_Oldlist to Ecore_List2 and rename the funcs from _list_
to _list2_


SVN revision: 16425
2005-08-30 10:05:27 +00:00
Carsten Haitzler c5973d1f61 if an ecore evas is shaped and avoid damage - render it just before a show :)
SVN revision: 15651
2005-07-07 03:31:34 +00:00
sebastid 886713a310 The const char *arg and subsequent ellipses in the execl, execlp, and
execle functions can be thought of as arg0, arg1, ..., argn.   Together
they describe a list of one or more pointers to null-terminated strings
that represent the argument list available  to  the  executed  program.
The  first argument, by convention, should point to the file name asso-
ciated with the file being executed.  The list  of  arguments  must  be
terminated  by a NULL pointer, and, since these are variadic functions,
this pointer must be cast (char *) NULL.


SVN revision: 14411
2005-04-27 14:30:36 +00:00
tsauerbeck f83c81433d mingw portability
SVN revision: 11926
2004-10-20 17:51:29 +00:00
ncn 29474a9d15 Some cleanup, grouped functions, about to transfer more info into the header file descriptions.
SVN revision: 11693
2004-09-22 04:25:35 +00:00
xcomputerman 1034f13443 Merge Ewd code into Ecore.
The new functions (Ecore_Data.h) have not been tested yet, be warned! :)


SVN revision: 9384
2004-03-18 05:29:54 +00:00
Carsten Haitzler 75047789ad slight change in doc comments... get rid of htmlisms...
SVN revision: 9037
2004-02-20 07:06:29 +00:00
Carsten Haitzler a5c2425084 damn you salizar! damn you!
errr. i mean. ecore moves to HEAD!


SVN revision: 7475
2003-09-23 08:09:32 +00:00