Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Cadence > Re: Running Cal...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 8 Topic 3988 of 4373
Post > Topic >>

Re: Running Calibre in background by skill

by Andrew Beckett <andrewb@[EMAIL PROTECTED] > May 8, 2008 at 10:52 AM

Riad KACED wrote, on 05/08/08 00:31:
> Hi There !
> 
> If I well understood your description, you don't seem to be interested
> in communicating with your child process (calibre). i,e, you're
> running Calibre in the background and let your skill running
> regardless whether calibre succeeded to run or not. So if you don't
> bother about communicating with your child process, why do you want to
> use the ipc functions ? I'm pretty much sure I'm missing something :-(
> 
> I would advice the following in your case (This is an example):
> ; Print your calibre command into a string : calibreCommand
> sprintf(calibreCommand "/yourMgcInstallDir/bin/calibre -drc -hier -
> whateverOptionOrCtrlFile %s/%s.gds &" dirName cellName)
> system(calibreCommand)
> 
> Anyway, This a little example about using IPCs
> 
> ;-----------------------------------------------------------------
> ; Get The user name from unix
> cidUser = ipcBeginProcess("whoami")
> ipcWait(cidUser)
> ridUser=car(parseString(ipcReadProcess(cidUser) "\n"))
> 
> ; Get The hostname from unix
> cidHost = ipcBeginProcess("uname -n")
> ipcWait(cidHost)
> ridHost=car(parseString(ipcReadProcess(cidHost) "\n"))
> ;-----------------------------------------------------------------
> 
> I saw you are using csh() to run your Calibre and I guess it is for a
> purpose. In the case you move to ipc, you have to know that 'ipc' is
> not running commands under your default login shell even if the
> commands are passed through it, ipcBeginProcess executes commands
> using Bourne Shell (sh).
> 
> BTW : What does it mean "... but behavior of my skill program is not
> as expected ! "
> 
> Hope this help you !
> 
> Interesting and Could be useful :
> Interprocess Communication SKILL Functions Reference -->
> $CDSHOME/doc/skipcref.pdf
> 
> Riad.

My guess is that he needs to know when it's finished - to do some further 
processing - but doesn't want the session to block.

So something like:

procedure(MYexitHandler(cid status)
    ... do the things you want to do when Calibre has finished ...
)

; just to print any output from the command to the CIW
procedure(MYdataHandler(cid data)
    printf("%s" data)
)

ipcBeginProcess("calibre ..." "" 'MYdataHandler 'MYdataHandler
'MYexitHandler)

For every bit of output that the calibre command produces, it will call
the data 
handler and print it. This happens asynchronously, so it doesn't block
DFII. 
When the child process exits, the MYexitHandler function will get called,
and 
then you can execute any further SKILL code you need - safe in the
knowledge 
that the calibre job exited.

Regards,

Andrew.
 




 8 Posts in Topic:
Running Calibre in background by skill
bedoune@[EMAIL PROTECTED]  2008-05-06 20:18:39 
Re: Running Calibre in background by skill
jayl-news@[EMAIL PROTECTE  2008-05-07 15:42:59 
Re: Running Calibre in background by skill
Riad KACED <riad.kaced  2008-05-07 16:31:05 
Re: Running Calibre in background by skill
Andrew Beckett <andrew  2008-05-08 10:52:13 
Re: Running Calibre in background by skill
bedoune@[EMAIL PROTECTED]  2008-05-13 18:30:53 
Re: Running Calibre in background by skill
Riad KACED <riad.kaced  2008-05-14 16:30:54 
Re: Running Calibre in background by skill
bedoune@[EMAIL PROTECTED]  2008-06-15 22:20:46 
Re: Running Calibre in background by skill
Andrew Beckett <andrew  2008-06-18 10:11:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:29:16 CST 2008.