Sictus/Swi predicate query

View: New views
4 Messages — Rating Filter:   Alert me  

Sictus/Swi predicate query

by fnb-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

Just on the off chance someone may know. I have a prolog program written for Sictus by someone else not by me, and it almost runs on my Swi Prolog. However the Sictus program has a predicate kill/1 that I am not quite sure about, and do not know if there is an equivalent in Swi Prolog. I can make some guesses about what it does, but I am not certain. I want to run the program on Swi Prolog since I have no access to Sictus.

Thanks for assistance.
Regards
Goffredo



RE: Sictus/Swi predicate query

by graham thwaites-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

The Sicstus documentation for 3.12.8 says:

 

kill(+Pid, +Signal)

Sends the signal Signal to process Pid.

 

HTH

 

Graham

 


From: swi-prolog-admin@... [mailto:swi-prolog-admin@...] On Behalf Of FNB
Sent: 30 June 2009 12:02
To: swi-prolog@...
Subject: [SWIPL] Sictus/Swi predicate query

 

Hi,

Just on the off chance someone may know. I have a prolog program written for Sictus by someone else not by me, and it almost runs on my Swi Prolog. However the Sictus program has a predicate kill/1 that I am not quite sure about, and do not know if there is an equivalent in Swi Prolog. I can make some guesses about what it does, but I am not certain. I want to run the program on Swi Prolog since I have no access to Sictus.

Thanks for assistance.
Regards
Goffredo


Re: Sictus/Swi predicate query

by Jan Wielemaker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Goffredo,

On Tuesday 30 June 2009 01:01:54 pm FNB wrote:
> Just on the off chance someone may know. I have a prolog program written
> for Sictus by someone else not by me, and it almost runs on my Swi Prolog.
> However the Sictus program has a predicate kill/1 that I am not quite sure
> about, and do not know if there is an equivalent in Swi Prolog. I can make
> some guesses about what it does, but I am not certain. I want to run the
> program on Swi Prolog since I have no access to Sictus.

A search mentiones it in the context of multi-threaded SISCtus, but
AFAIK that never became an official version. Otherwise I only expect it
in the context of processes. There you find kill/2 and process_kill/1,2
in SWI-Prolog.  Kill/2 is part of the Unix library and only available
on Unix systems.

Some more context may make clear what this kill is supposed to do ...

        Cheers --- Jan

_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog

Re: Sictus/Swi predicate query

by Jan Wielemaker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 30 June 2009 01:09:11 pm graham thwaites wrote:
> The Sicstus documentation for 3.12.8 says:
>
> kill(+Pid, +Signal)
>
> Sends the signal Signal to process Pid.

That is provided by library(unix) on non-Windows systems. Possibly
process_kill/2 from library(process) provides an alternative, though
the docs say it only works on PID's returned by process_create/3.
I don't recall why this is.

See http://www.swi-prolog.org/pldoc/doc_for?object=process%3aprocess_kill%2f1

        Cheers --- Jan

_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog