* harbour/common.mak
* harbour/source/rtl/Makefile
* harbour/include/hbapifs.h
* harbour/include/hbextern.ch
+ harbour/source/rtl/hbproces.c
+ harbour/source/rtl/hbprocfn.c
+ added C functions hb_fsOpenProcess(), hb_fsProcessValue(),
hb_fsCloseProcess()
+ added .prg functions HB_OPENPROCESS(), HB_PROCESSVALUE(),
HB_CLOSEPROCESS()
Based on xHarbour code by Giancarlo Niccolai.
Warning: it's possible that they will be changed in the future.
Please test current implementation. Now few notes about it.
Each handle returned by HB_OPENPROCESS() have to be closed
by HB_PROCESSVALUE(). Even if process is killed by HB_CLOSEPROCESS()
its handle is still open and HB_PROCESSVALUE() has to be executed.
Type of handle depends on OS. In *nixes it's process PID. In MS-Windows
it's HANDLE. HB_PROCESSVALUE() attach process exit result in *nixes
cleaning zombie processes and in Windows closing the HANDLE. If you
do not call this function then you will have resource leak.
HB_CLOSEPROCESS() only sends quite request to the process but does
not execute any cleanup code.
All communication handles returned in parameters by reference by
HB_OPENPROCESS() function have to be closed using FCLOSE() function.
If hStdOut and hStdErr are references to the same variables then
executing process stdout and stderr is redirected to the only one
pipe. When handles for stdout, stderr and stdin are not given then
executed process inherits them from parent process unless <lDetach>
parameter is not given. In such case they are redirected to null
device (/dev/null or NUL).
The OS2 version is not tested. Please make tests.
There is no support for DOS which is single process OS.
In WinCE builds std{out,err,in} redirecting and process detaching does
not work too.
The parameters parsing should be updated. Now MS-Windows version uses
native OS command line parsing and quoting by "" can be used for
parameters with blank characters. I do not know any escape character
which can be used to pass (") as parameter to MS-Windows application.
In all other OS-es standard bourne shell rules are used. Parameters can
be quoted by "" or '' and escape character is \. Quoting by '' disables
special meaning of escape character. In OS2 where \ is path separator
escaping and '' quoting is disabled so it works like in MS-Windows
but I do not know if parameters divided by calling process are fully
respected by low level API calls in this system.
245 lines
3.8 KiB
Makefile
245 lines
3.8 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
ROOT = ../../
|
|
|
|
C_SOURCES=\
|
|
abs.c \
|
|
accept.c \
|
|
ampm.c \
|
|
at.c \
|
|
binnum.c \
|
|
binnumx.c \
|
|
box.c \
|
|
cdpapi.c \
|
|
chrasc.c \
|
|
colorind.c \
|
|
console.c \
|
|
copyfile.c \
|
|
datec.c \
|
|
dates.c \
|
|
dateshb.c \
|
|
datesx.c \
|
|
defpath.c \
|
|
defpathu.c \
|
|
descend.c \
|
|
dirdrive.c \
|
|
direct.c \
|
|
diskspac.c \
|
|
disksphb.c \
|
|
do.c \
|
|
empty.c \
|
|
errorapi.c \
|
|
errorapu.c \
|
|
errorint.c \
|
|
file.c \
|
|
filebuf.c \
|
|
filehb.c \
|
|
filesys.c \
|
|
fkmax.c \
|
|
fmhb.c \
|
|
fnsplit.c \
|
|
fscopy.c \
|
|
fserror.c \
|
|
fssize.c \
|
|
fstemp.c \
|
|
gete.c \
|
|
gt.c \
|
|
gtapi.c \
|
|
gtchrmap.c \
|
|
gtclip.c \
|
|
gtfunc.c \
|
|
gtkbstat.c \
|
|
gtkeycod.c \
|
|
gtsys.c \
|
|
gttone.c \
|
|
gx.c \
|
|
hardcr.c \
|
|
hbadler.c \
|
|
hbbit.c \
|
|
hbcrc.c \
|
|
hbhex.c \
|
|
hbmd5.c \
|
|
hbntos.c \
|
|
hbffind.c \
|
|
hbfile.c \
|
|
hbgtcore.c \
|
|
hbi18n.c \
|
|
hbinet.c \
|
|
hbproces.c \
|
|
hbprocfn.c \
|
|
hbrandom.c \
|
|
hbregex.c \
|
|
hbregexc.c \
|
|
hbrunfun.c \
|
|
hbstrsh.c \
|
|
hbtoken.c \
|
|
hbzlib.c \
|
|
idle.c \
|
|
inkey.c \
|
|
inkeyapi.c \
|
|
is.c \
|
|
isprint.c \
|
|
itemseri.c \
|
|
langapi.c \
|
|
left.c \
|
|
len.c \
|
|
lennum.c \
|
|
math.c \
|
|
maxrow.c \
|
|
memofile.c \
|
|
minmax.c \
|
|
mlcfunc.c \
|
|
mod.c \
|
|
mouse53.c \
|
|
mouseapi.c \
|
|
mousex.c \
|
|
mtran.c \
|
|
natmsg.c \
|
|
natmsgu.c \
|
|
net.c \
|
|
oemansi.c \
|
|
oemansix.c \
|
|
oldbox.c \
|
|
oldclear.c \
|
|
pad.c \
|
|
padc.c \
|
|
padl.c \
|
|
padr.c \
|
|
philes.c \
|
|
philes53.c \
|
|
philesx.c \
|
|
rat.c \
|
|
replic.c \
|
|
right.c \
|
|
round.c \
|
|
run.c \
|
|
samples.c \
|
|
saverest.c \
|
|
scroll.c \
|
|
scrrow.c \
|
|
secondfs.c \
|
|
seconds.c \
|
|
setcolor.c \
|
|
setcurs.c \
|
|
setkey.c \
|
|
setpos.c \
|
|
setposbs.c \
|
|
shadow.c \
|
|
shadowu.c \
|
|
soundex.c \
|
|
space.c \
|
|
spfiles.c \
|
|
str.c \
|
|
strcase.c \
|
|
strmatch.c \
|
|
strpeek.c \
|
|
strtran.c \
|
|
strzero.c \
|
|
stuff.c \
|
|
substr.c \
|
|
tone.c \
|
|
trace.c \
|
|
transfrm.c \
|
|
trim.c \
|
|
tscalara.c \
|
|
tscalarb.c \
|
|
tscalarc.c \
|
|
tscalard.c \
|
|
tscalarh.c \
|
|
tscalarl.c \
|
|
tscalarn.c \
|
|
tscalarp.c \
|
|
tscalars.c \
|
|
tscalaru.c \
|
|
type.c \
|
|
val.c \
|
|
valtostr.c \
|
|
valtype.c \
|
|
version.c \
|
|
word.c \
|
|
xhelp.c \
|
|
xsavescr.c \
|
|
|
|
|
|
PRG_SOURCES=\
|
|
achoice.prg \
|
|
adir.prg \
|
|
alert.prg \
|
|
altd.prg \
|
|
browdb.prg \
|
|
browdbx.prg \
|
|
browse.prg \
|
|
checkbox.prg \
|
|
color53.prg \
|
|
dbedit.prg \
|
|
devoutp.prg \
|
|
dircmd.prg \
|
|
dirscan.prg \
|
|
einstv52.prg \
|
|
einstvar.prg \
|
|
einstvau.prg \
|
|
errorsys.prg \
|
|
fieldbl.prg \
|
|
getlist.prg \
|
|
getsys.prg \
|
|
getsys53.prg \
|
|
gui.prg \
|
|
hbini.prg \
|
|
input.prg \
|
|
listbox.prg \
|
|
memoedit.prg \
|
|
memvarbl.prg \
|
|
menuto.prg \
|
|
menusys.prg \
|
|
objfunc.prg \
|
|
perfuncs.prg \
|
|
profiler.prg \
|
|
pushbtn.prg \
|
|
radiobtn.prg \
|
|
radiogrp.prg \
|
|
readkey.prg \
|
|
readvar.prg \
|
|
scrollbr.prg \
|
|
setfunc.prg \
|
|
setta.prg \
|
|
tclass.prg \
|
|
tbcolumn.prg \
|
|
tbrowse.prg \
|
|
tbrowsys.prg \
|
|
teditor.prg \
|
|
text.prg \
|
|
tget.prg \
|
|
tgetint.prg \
|
|
tgetlist.prg \
|
|
thfuncx.prg \
|
|
tlabel.prg \
|
|
tmenuitm.prg \
|
|
tmenusys.prg \
|
|
tobject.prg \
|
|
tpersist.prg \
|
|
tpopup.prg \
|
|
treport.prg \
|
|
tscalar.prg \
|
|
tsymbol.prg \
|
|
ttextlin.prg \
|
|
tthreadx.prg \
|
|
ttopbar.prg \
|
|
typefile.prg \
|
|
typefilx.prg \
|
|
valtoexp.prg \
|
|
wait.prg \
|
|
|
|
LIBNAME=hbrtl
|
|
|
|
# The list of all valid GT drivers is defined in config/<arch>/global.cf.
|
|
DIRS=$(HB_GT_LIBS)
|
|
|
|
include $(TOP)$(ROOT)config/lib.cf
|
|
include $(TOP)$(ROOT)config/dir.cf
|
|
|
|
ifneq ($(HB_GT_LIB),)
|
|
CFLAGS += -DHB_GT_LIB=$(HB_GT_LIB:gt%=%)
|
|
endif
|