Yves S. Garret | 1 Jun 2012 03:14
Picon

What happened when I changed directories?

Hi guys.  I changed directories in clisp with (ext:cd "path/to/file") and got this... could some please explain why I got this error and how could I avoid it?



The command on line 7 shows that I got to the desired location, so the path is valid (I suspected that I had fat-fingered the path and hence the error, until I found out it switched correctly).
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel
Raymond Toy | 1 Jun 2012 04:16
Picon

Re: What happened when I changed directories?

On 5/31/12 6:14 PM, Yves S. Garret wrote:
> Hi guys.  I changed directories in clisp with (ext:cd "path/to/file")
> and got this... could some please explain why I got this error and how
> could I avoid it?
>
> http://bin.cakephp.org/view/209161709
>
> The command on line 7 shows that I got to the desired location, so the
> path is valid (I suspected that I had fat-fingered the path and hence
> the error, until I found out it switched correctly).
>
Too many closing parens on the first line.  Perhaps the error message
could add something along  the lines of "extra closing parenthesis?" 
That would make it clearer.

Ray

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Pascal J. Bourguignon | 1 Jun 2012 04:48
X-Face
Face
Favicon

Re: What happened when I changed directories?

Raymond Toy <toy.raymond <at> gmail.com> writes:

> On 5/31/12 6:14 PM, Yves S. Garret wrote:
>> Hi guys.  I changed directories in clisp with (ext:cd "path/to/file")
>> and got this... could some please explain why I got this error and how
>> could I avoid it?
>>
>> http://bin.cakephp.org/view/209161709
>>
>> The command on line 7 shows that I got to the desired location, so the
>> path is valid (I suspected that I had fat-fingered the path and hence
>> the error, until I found out it switched correctly).
>>
> Too many closing parens on the first line.  Perhaps the error message
> could add something along  the lines of "extra closing parenthesis?" 
> That would make it clearer.

You can do that in your ~/.clisprc :

[5]> (set-macro-character #\)
          (lambda (stream ch) 
            (declare (ignore stream ch))
            (error "extra closing parenthesis")))

T
[6]> (+ 1 2))
3
[7]> 
*** - extra closing parenthesis
The following restarts are available:
ABORT          :R1      Abort main loop
Break 1 [8]> :q
[9]> 

Or you can even make it just a warning, ignoring superfluous closing parentheses:

[9]> (set-macro-character #\)
          (lambda (stream ch) 
            (declare (ignore stream ch))
            (warn "extra closing parenthesis")
            (values)))
T

[13]> (+ 1 2)) (* 3 4)))
3
[14]> 
WARNING: extra closing parenthesis
12
[15]> 
WARNING: extra closing parenthesis
WARNING: extra closing parenthesis

--

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Yves S. Garret | 1 Jun 2012 14:38
Picon

Fwd: What happened when I changed directories?

First of all.  Thank you all for pointing out my silly mistake.  Late in the day that I hacking that and I'm already kicking myself :-) .  I thought it was an issue with clisp.


Second of all, I don't know why, but I never got any of your e-mails, only the digest.  Going to look at my settings.

---------- Forwarded message ----------
From: Yves S. Garret <yoursurrogategod <at> gmail.com>
Date: Thu, May 31, 2012 at 9:14 PM
Subject: What happened when I changed directories?
To: clisp-devel <clisp-devel <at> lists.sourceforge.net>


Hi guys.  I changed directories in clisp with (ext:cd "path/to/file") and got this... could some please explain why I got this error and how could I avoid it?


The command on line 7 shows that I got to the desired location, so the path is valid (I suspected that I had fat-fingered the path and hence the error, until I found out it switched correctly).

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel
Anton Vodonosov | 7 Jun 2012 23:51
Picon
Favicon

terminating clisp: clisp.exe vs lisp.exe

Hello.

My program starts clisp as a child process to do some work. 
Sometimes this work may hang.

In this case I would like to kill the child lisp process.

clisp.exe starts another process, lisp.exe which, as I understand,
preforms all the job. 

It's not trivial to even get process id of lisp.exe.

What are my options to reliable kill started

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Anton Vodonosov | 7 Jun 2012 23:55
Picon
Favicon

terminating clisp: clisp.exe vs lisp.exe

Hello.

My program starts clisp as a child process to do some work.
Sometimes this work may hang.

In this case I would like to kill the child lisp process.

clisp.exe starts another process, lisp.exe which, as I understand,
preforms all the job.

It's not trivial to even get process id of lisp.exe.

What are my options to reliable kill started CLISP?
Is it possible to start CLISP in a way that it consists only of one process?

I am curious btw, what is the role of CLISP separation into lisp.exe and
clisp.exe?

Best regards,
Anton

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Sam Steingold | 8 Jun 2012 04:20
Picon

Re: terminating clisp: clisp.exe vs lisp.exe

Hi,

> * Anton Vodonosov <nibqbabfbi <at> lnaqrk.eh> [2012-06-08 01:55:03 +0400]:
>
> It's not trivial to even get process id of lisp.exe.

http://clisp.org/impnotes/syscalls.html#processes

> What are my options to reliable kill started CLISP?

killall -v lisp.exe

> Is it possible to start CLISP in a way that it consists only of one process?

http://clisp.org/impnotes/image.html
(saveinitmem ... :executable t)

> I am curious btw, what is the role of CLISP separation into lisp.exe
> and clisp.exe?

http://clisp.org/impnotes/clisp.html#opt-link-set
$ clisp -K base
and 
$ clisp -K full
start different lisp.exe files.

PS. You now owe me 3 zorkmids. :-)
http://clisp.org/impnotes/faq.html#faq-fine

--

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://jihadwatch.org http://camera.org
http://honestreporting.com http://www.PetitionOnline.com/tap12009/
There are many reasons not to use Linux - but no good ones.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Pascal J. Bourguignon | 8 Jun 2012 12:58
Face
Favicon

Re: terminating clisp: clisp.exe vs lisp.exe

Anton Vodonosov <avodonosov <at> yandex.ru> writes:

> Hello.
>
> My program starts clisp as a child process to do some work.
> Sometimes this work may hang.
>
> In this case I would like to kill the child lisp process.
>
> clisp.exe starts another process, lisp.exe which, as I understand,
> preforms all the job.
>
> It's not trivial to even get process id of lisp.exe.
>
> What are my options to reliable kill started CLISP?

killall will kill ALL your clisp processes, not only the one you want to
kill.

Given the current state of affair, your best bet is to open a pipe
between the parent process and the clisp process, and use it to provoke
a killing sigchld

> Is it possible to start CLISP in a way that it consists only of one process?

You can also run lisp.exe directly.  You must be careful with the options.

Perhaps it would be a good idea to remove the call to fork() from the
clisp driver?

--

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Sam Steingold | 8 Jun 2012 15:49
Picon

Re: terminating clisp: clisp.exe vs lisp.exe

> * Pascal J. Bourguignon <cwo <at> vasbezngvzntb.pbz> [2012-06-08 12:58:38 +0200]:
>
> Perhaps it would be a good idea to remove the call to fork() from the
> clisp driver?

there is no fork() there.
unix uses execv(), windows uses CreateProcess().

--

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://thereligionofpeace.com http://mideasttruth.com
http://iris.org.il http://ffii.org http://www.memritv.org http://truepeace.org
Those who don't know lisp are destined to reinvent it, poorly.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel

Pascal J. Bourguignon | 8 Jun 2012 17:02
X-Face
Face
Favicon

Re: terminating clisp: clisp.exe vs lisp.exe

Sam Steingold <sds <at> gnu.org> writes:

>> * Pascal J. Bourguignon <cwo <at> vasbezngvzntb.pbz> [2012-06-08 12:58:38 +0200]:
>>
>> Perhaps it would be a good idea to remove the call to fork() from the
>> clisp driver?
>
> there is no fork() there.
> unix uses execv(), windows uses CreateProcess().

Indeed.  The OP report is bogus.

Anton Vodonosov <avodonosov <at> yandex.ru> writes:

> Hello.
>
> My program starts clisp as a child process to do some work.
> Sometimes this work may hang.
>
> In this case I would like to kill the child lisp process.
>
> clisp.exe starts another process, lisp.exe which, as I understand,
> preforms all the job.
>
> It's not trivial to even get process id of lisp.exe.

It is trivial to get the process id of a child process.  You just get it
as result of fork(2) (or CreateProcess()).  In bash(2), this child
process PID is returned by the special variable $!:

    clisp -norc -q -ansi \
        -x '(format t "~%clisp pid=~A~2%" (process-id))' & \
        echo "bash pid=$!"

> What are my options to reliable kill started CLISP?

Memorize the child PID, and use it to send a signal.

> Is it possible to start CLISP in a way that it consists only of one process?

It consists only of one process.

--

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
clisp-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clisp-devel


Gmane