System calls

Here is an example of how to make a system call from a script and get console output.
The call is asynchronous - it returns after a time whether the process has completed or not.

display_etc
   | pipe |
   pipe := FileStream popen: 'ls -l /etc' dir: FileStream read.        
   Transcript showCr: pipe contents. !   

Synchronous calls:
To make an operating system call and block until the command has completed (synchronous). The output is an integer. Here is an example:-

shellOut := Smalltalk system: 'ldapadd -x -f /project/LDAPImport.ldif -D binddnhere -S passwordinfilehere'

how would one go about doing so -- something like the synchronous example that traps changes and pushes them along for processing in ST?

You can make a loop like this:

| f size |
f := File name: '/path/to/logfile'.
size := f size.
[ 
    (Delay forSeconds: 2) wait.
    f refresh.
    f size = size
] whileTrue

User login