Product Documentation
Cadence Interprocess Communication SKILL Reference
Product Version IC23.1, June 2023

ipcWriteProcess

ipcWriteProcess( 
o_childId 
t_data 
) 
=> t / nil 

Description

Writes data to the stdin port of the child process.

This function takes a o_childId and a SKILL string containing the data destined for the child process.

The data sent through ipcWriteProcess is written into the child’s stdin port. You must ensure that the data sent is appropriately packaged for the child to read in. For example, if the child performs a string read operation such as gets, the string given to ipcWriteProcess must terminate with a line feed character; otherwise gets continues blocking.

Arguments

o_childId

Child process handle.

t_data

SKILL string containing the data destined for the child process. For a child process to read the input, this string must be terminated by a \n character.

Value Returned

t

The function does not block and is successful.

nil

The destination child process expires before ipcWriteProcess is performed.

Examples

;; substitute your login name for user
      cid = ipcBeginProcess("mail user") ;user is your login name
ipc:7
ipcWriteProcess(cid "Hello from SKILL IPC\n")
t
ipcCloseProcess(cid)
Check your email. You should have a message from yourself containing "Hello from SKILL IPC".

Note the \n character at the end of the t_data string.

Related Topics

Interprocess Communication Functions

ipcBeginProcess

ipcReadProcess


Return to top
 ⠀
X