caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] pipe puzzle
@ 2003-02-21  8:14 Issac Trotts
  2003-02-21  8:46 ` [Caml-list] " Andrzej M. Ostruszka
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Issac Trotts @ 2003-02-21  8:14 UTC (permalink / raw)
  To: OCaml List

I have an alias (called 'o' because I use it often) that does
the following:

   (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml

It works just fine except that when I suspend the process, and then
type

    fg

it tells me

  Signal 44

and kills off my OCaml session.  Can someone here shed some light
on this?  

Issac



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Caml-list] Re: pipe puzzle
  2003-02-21  8:14 [Caml-list] pipe puzzle Issac Trotts
@ 2003-02-21  8:46 ` Andrzej M. Ostruszka
  2003-02-21  9:02 ` [Caml-list] " POUS Damien
  2003-02-21  9:05 ` IKEDA Katsumi
  2 siblings, 0 replies; 8+ messages in thread
From: Andrzej M. Ostruszka @ 2003-02-21  8:46 UTC (permalink / raw)
  To: OCaml List

On Fri, Feb 21 (2003), Issac Trotts wrote:
[...]
>    (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml
[...]
> and kills off my OCaml session.  Can someone here shed some light
> on this?  

man ledit
/KNOWN BUGS<Enter>
						Best regards
-- 
    ____   _  ___
   /  | \_/ |/ _ \		Andrzej Marek Ostruszka
  / _ |     | (_) | Instytut Fizyki, Uniwersytet Jagiellonski (Cracow)
 /_/ L|_|V|_|\___/	(PGP <-- finger ostruszk@order.if.uj.edu.pl)
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-21  8:14 [Caml-list] pipe puzzle Issac Trotts
  2003-02-21  8:46 ` [Caml-list] " Andrzej M. Ostruszka
@ 2003-02-21  9:02 ` POUS Damien
  2003-02-22  5:05   ` Issac Trotts
  2003-02-21  9:05 ` IKEDA Katsumi
  2 siblings, 1 reply; 8+ messages in thread
From: POUS Damien @ 2003-02-21  9:02 UTC (permalink / raw)
  To: OCaml List



On Fri, 21 Feb 2003, Issac Trotts wrote:

> I have an alias (called 'o' because I use it often) that does
> the following:
>    (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml
> It works just fine except that when I suspend the process, and then
> type
>     fg
> it tells me
>   Signal 44
> and kills off my OCaml session.  Can someone here shed some light
> on this?
ledit don't like suspends... the signal kill it, and
then SIGPIPE is sent to Ocaml...

man ledit says :
KNOWN BUGS
       It  is  not  possible  to suspend ledit (using the suspend
       command, usually ctrl-z).

> Issac
Damien

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-21  8:14 [Caml-list] pipe puzzle Issac Trotts
  2003-02-21  8:46 ` [Caml-list] " Andrzej M. Ostruszka
  2003-02-21  9:02 ` [Caml-list] " POUS Damien
@ 2003-02-21  9:05 ` IKEDA Katsumi
  2 siblings, 0 replies; 8+ messages in thread
From: IKEDA Katsumi @ 2003-02-21  9:05 UTC (permalink / raw)
  To: caml-list

Hi,

From: Issac Trotts <ijtrotts@ucdavis.edu>
> I have an alias (called 'o' because I use it often) that does
> the following:
> 
>    (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml
> 
> It works just fine except that when I suspend the process, and then
> type
> 
>     fg
> 
> it tells me
> 
>   Signal 44
> 
> and kills off my OCaml session.  Can someone here shed some light
> on this?  

I think signal is sent by ledit.

Try the following.
(echo "foo bar baz"; ledit) | tail -f

Then suspend it and run the command 'fg'.

Regards,

-- 
IKEDA Katsumi  <ikeda@msi.co.jp>
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-21  9:02 ` [Caml-list] " POUS Damien
@ 2003-02-22  5:05   ` Issac Trotts
  2003-02-22 13:36     ` Gerd Stolpmann
  0 siblings, 1 reply; 8+ messages in thread
From: Issac Trotts @ 2003-02-22  5:05 UTC (permalink / raw)
  To: OCaml List

POUS Damien wrote:

>On Fri, 21 Feb 2003, Issac Trotts wrote:
>
>  
>
>>I have an alias (called 'o' because I use it often) that does
>>the following:
>>   (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml
>>It works just fine except that when I suspend the process, and then
>>type
>>    fg
>>it tells me
>>  Signal 44
>>and kills off my OCaml session.  Can someone here shed some light
>>on this?
>>    
>>
>ledit don't like suspends... the signal kill it, and
>then SIGPIPE is sent to Ocaml...
>
>man ledit says :
>KNOWN BUGS
>       It  is  not  possible  to suspend ledit (using the suspend
>       command, usually ctrl-z).
>
You're right.  Even ledit-1.11, which can handle suspend, cannot
handle (echo "let x=1;;"; ledit) | ocaml.  So now I simply use ledit ocaml
with ledit 1.11 and momentarily forget my wish to have a few commands
(not inside a module) that always run on startup.

Issac

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-22  5:05   ` Issac Trotts
@ 2003-02-22 13:36     ` Gerd Stolpmann
  2003-02-22 23:35       ` Issac Trotts
  0 siblings, 1 reply; 8+ messages in thread
From: Gerd Stolpmann @ 2003-02-22 13:36 UTC (permalink / raw)
  To: Issac Trotts; +Cc: OCaml List

Am Sam, 2003-02-22 um 06.05 schrieb Issac Trotts:
> POUS Damien wrote:
> 
> >On Fri, 21 Feb 2003, Issac Trotts wrote:
> >
> >  
> >
> >>I have an alias (called 'o' because I use it often) that does
> >>the following:
> >>   (echo "let print s = print_string s; print_newline();;"; ledit) | ocaml
> >>It works just fine except that when I suspend the process, and then
> >>type
> >>    fg
> >>it tells me
> >>  Signal 44
> >>and kills off my OCaml session.  Can someone here shed some light
> >>on this?
> >>    
> >>
> >ledit don't like suspends... the signal kill it, and
> >then SIGPIPE is sent to Ocaml...
> >
> >man ledit says :
> >KNOWN BUGS
> >       It  is  not  possible  to suspend ledit (using the suspend
> >       command, usually ctrl-z).
> >
> You're right.  Even ledit-1.11, which can handle suspend, cannot
> handle (echo "let x=1;;"; ledit) | ocaml.  So now I simply use ledit ocaml
> with ledit 1.11 and momentarily forget my wish to have a few commands
> (not inside a module) that always run on startup.

You can put these commands into .ocamlinit (see docs about the
toplevel system).

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-22 13:36     ` Gerd Stolpmann
@ 2003-02-22 23:35       ` Issac Trotts
  2003-02-23 11:06         ` Stefano Zacchiroli
  0 siblings, 1 reply; 8+ messages in thread
From: Issac Trotts @ 2003-02-22 23:35 UTC (permalink / raw)
  To: OCaml List

Gerd Stolpmann wrote:

>Am Sam, 2003-02-22 um 06.05 schrieb Issac Trotts:
>  
>
>>>
>>>      
>>>
>>You're right.  Even ledit-1.11, which can handle suspend, cannot
>>handle (echo "let x=1;;"; ledit) | ocaml.  So now I simply use ledit ocaml
>>with ledit 1.11 and momentarily forget my wish to have a few commands
>>(not inside a module) that always run on startup.
>>    
>>
>
>You can put these commands into .ocamlinit (see docs about the
>toplevel system).
>
>Gerd
>
Thanks for the hint.  In the source for the toplevel, it says

  if Sys.file_exists ".ocamlinit" then ignore(use_silently ppf ".ocamlinit")

It would be nice if it opened ~/.ocamlinit but it's no big deal because the
alias can just be

  alias o='cp ~/.ocamlinit .ocamlinit; ledit ocaml'

So, as usual, OCaml can do what I want.  

Issac



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] pipe puzzle
  2003-02-22 23:35       ` Issac Trotts
@ 2003-02-23 11:06         ` Stefano Zacchiroli
  0 siblings, 0 replies; 8+ messages in thread
From: Stefano Zacchiroli @ 2003-02-23 11:06 UTC (permalink / raw)
  To: OCaml List

On Sat, Feb 22, 2003 at 03:35:26PM -0800, Issac Trotts wrote:
> It would be nice if it opened ~/.ocamlinit but it's no big deal
> because the alias can just be

I've already posted a minimal patch for the toplevel that looks for
~~/.ocamlinit, it's embedded in the debian ocaml package and I suppose is
also in the ocaml bug tracking system.

Cheers.

-- 
Stefano Zacchiroli  -  Undergraduate Student of CS @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it}  -  http://www.bononia.it/zack/
"  I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!  " -- G.Romney
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-02-23 16:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-21  8:14 [Caml-list] pipe puzzle Issac Trotts
2003-02-21  8:46 ` [Caml-list] " Andrzej M. Ostruszka
2003-02-21  9:02 ` [Caml-list] " POUS Damien
2003-02-22  5:05   ` Issac Trotts
2003-02-22 13:36     ` Gerd Stolpmann
2003-02-22 23:35       ` Issac Trotts
2003-02-23 11:06         ` Stefano Zacchiroli
2003-02-21  9:05 ` IKEDA Katsumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).