Domino 9 und frühere Versionen > ND6: Administration & Userprobleme

Starten von Linux-Programmen

<< < (2/2)

Glombi:
Bei mir gibts keinen Unterschied zwischen Shell und ShellID.

pallas:
Ich hab folgende Einträge:

Bei Shell:
Usage
Shell must be called from within an expression or an assignment statement, so that its return value is used.
In a UNIX or AIX environment, LotusScript will resume execution of the script only after the program has completed. 
In other environments, after Shell starts a program, LotusScript continues to execute the script without waiting to make sure the program has completed. You cannot be sure that a program started by Shell has finished running before the rest of your script is executed.

Bei ShellID:
Usage
Shellid must be called from within an expression or an assignment statement, so that its return value is used.
After Shellid starts a program, LotusScript continues to execute the script without waiting to make sure the program has completed. You cannot be sure that a program started by Shellid has finished running before the rest of your script is executed.
ShellID is a restricted operation - make sure you have set runtime security level 2 or higher "Allow restricted operations".
This feature will spawn processes which may outlive the spawning process.
The  "ID" returned from the function is so that you can terminate the program at a later time. If you don't want this behavior, use Shell.

smoki:
Ich habe zwar kein Domino auf Linux oder nen Unix, aber es ist logisch, dass hier der "Shell" sich unterscheided auf beiden Betriebssystemen:

Auf Windows wird es vermutlich mit dem API-Befehl "Shell", der den Befehl "CreateProcess" aufruft, der angegebene String als Anwendung gestartet. Hierbei setzt Windows automatisch einen neuen Prozess auf, der unabhänig vom Vorgänger ausgeführt wird (Fehlende Hierachieverwaltung unter Windows...)

Unter Linux, wird vermutlich einer der "exec()"-Syscalls aufgerufen, der nicht automatisch in einem eigenen Prozess gestartet wird. Um einen neuen Prozess auszuführen wird zusätzlich noch "fork()" benötigt!

Vielleicht läuft "shellID" unter Unix wirklich anders? Da nur eine neue Prozess-ID bei einem Fork erzeugt wird?! (Oder wenn nicht, wird nur die ID des aktuellen Prozesses zurückgegeben...)

Wenn es damit nicht geht, funktioniert ggf. folgendes:

Shell("/usr/bin/perl /path/to/script.pl &")

Oder falls hier keine "normale" shell dahinterliegt, dass vielleicht es so läuft:

Shell(|/usr/bin/bash "/path/to/script.pl &"|)

Wenn nicht, versuch auch mal das & hinter dem letzten Anführungszeichen?!

Bitte gib feedback, was und obs funktioniert! Danke!

Ich wünsche ein schönes Wochenende!
Chris

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln