• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. ipcReadProcess returns empty string, when nil is expect...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 10226
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ipcReadProcess returns empty string, when nil is expected

marcelpreda
marcelpreda over 3 years ago

Hi *,

I have some problems with ipcReadProcess() calls.

I was expecting when child process end, to get nil so I know when there is nothing to read and to end the loop.

The output that I'm trying to parse is just few lines of text (less then 10 lines).

But the ipcReadProcess() returns empty string and because of it I'm in a loop which never ends.

I was trying to use also the ipcWaitForProcess() before first ipcReadProcess(), but no success too.

After many trials I've ended with a small procedure which doesn't work too, see below.

Any idea?

I'm 100% sure that I've did similar lops in the past (older virtuoso versions) and they were working properly.

virtuoso "sub-version  IC6.1.8-64b.500.6.EHF7461 "  

procedure( TestIpcRead()
pid = ipcBeginProcess("ls")
outStr = ipcReadProcess(pid 10)
while( outStr != nil
info("Debug outStr = %L\n" outStr)
outStr = ipcReadProcess(pid)
)
)

And here is the output is.

Debug outStr = "CDS.log\nCDS.log.17079.gz\nCDS.log.19935\nCDS.log.19935.cdslck\nCDS.log.24278\n"
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""
Debug outStr = ""

Thank you,
Marcel
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Hi Marcel,

    The behaviour is the same in IC5141, so it's not changed recently.

    The key is that you have not specified a timeout for the second ipcReadProcess() and hence it is a non-blocking read which only reads buffered data. You can't even then use ipcIsAliveProcess in the loop to determine whether the process is alive or not - because it never has a chance to update the status. 

    If you give a small timeout (e.g. ipcReadProcess(pid 1) for the call within the while loop, it behaves as you are expecting.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • marcelpreda
    marcelpreda over 3 years ago in reply to Andrew Beckett

    Hi Andrew,

    The timeout argument did the trick, thanks.

    Marcel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • marcelpreda
    marcelpreda over 3 years ago in reply to Andrew Beckett

    Hi Andrew,

    The timeout argument did the trick, thanks.

    Marcel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information