Guest
hi,
I writing a skill that runs Calibre automatically.
I fill my options files automatically and then i run Calibre by
command:
csh(Com)
where Com = strcat("calibre" ...)
It works fine but i'm facing a problem. During the execution of the
command, Cadence is frozen and i have to wait ... i can't work during
this time.
So i tried to add "&" in my command :
Com = strcat("calibre" ... "&")
csh(Com)
In this case, the skill program is continuing but behavior of my skill
program is not as expected !
So i found an old topic about asynchronous code:
procedure(MYdataHandler(ipcId data)
printf("%s" data)
)
procedure(MYexitHandler(ipcId exitStatus)
printf("Process %L exited with status %d\n" ipcId exitStatus)
)
id=ipcBeginProcess("ls" "" 'MYdataHandler 'MYdataHandler
'MYexitHandler)
But i don't understand how it works and how to modify it to fit my
code.
could someone help me please ?
Thanks and regards,
b.
I writing a skill that runs Calibre automatically.
I fill my options files automatically and then i run Calibre by
command:
csh(Com)
where Com = strcat("calibre" ...)
It works fine but i'm facing a problem. During the execution of the
command, Cadence is frozen and i have to wait ... i can't work during
this time.
So i tried to add "&" in my command :
Com = strcat("calibre" ... "&")
csh(Com)
In this case, the skill program is continuing but behavior of my skill
program is not as expected !
So i found an old topic about asynchronous code:
procedure(MYdataHandler(ipcId data)
printf("%s" data)
)
procedure(MYexitHandler(ipcId exitStatus)
printf("Process %L exited with status %d\n" ipcId exitStatus)
)
id=ipcBeginProcess("ls" "" 'MYdataHandler 'MYdataHandler
'MYexitHandler)
But i don't understand how it works and how to modify it to fit my
code.
could someone help me please ?
Thanks and regards,
b.