PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Dug myself into a silly hole
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Dug myself into a silly hole

Réponse
 
LinkBack Outils de la discussion
Vieux 02/11/2006, 21h10   #1
Sashi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Dug myself into a silly hole

I ran 'set -n' at the prompt and now it refuses to execute my commands!

Solaris 5.8.

Er, how do I get out? I put a couple of jobs in the background and
would prefer to bring ths terminal back to life rather than simply kill
it.

Thanks,
Sashi

  Réponse avec citation
Vieux 02/11/2006, 21h32   #2
Jordan Abel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole

2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>,
Sashi wrote:
> I ran 'set -n' at the prompt and now it refuses to execute my commands!
>
> Solaris 5.8.
>
> Er, how do I get out? I put a couple of jobs in the background and
> would prefer to bring ths terminal back to life rather than simply kill
> it.


send an eof. or several.

what shell are you using? set -n is ignored on bash and (this may vary) ksh, and
rejected on zsh.
  Réponse avec citation
Vieux 02/11/2006, 21h39   #3
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole

2006-11-2, 21:32(+00), Jordan Abel:
> 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>,
> Sashi wrote:
>> I ran 'set -n' at the prompt and now it refuses to execute my commands!
>>
>> Solaris 5.8.
>>
>> Er, how do I get out? I put a couple of jobs in the background and
>> would prefer to bring ths terminal back to life rather than simply kill
>> it.

>
> send an eof. or several.


That will terminate the shell though. There may not be any
better solution to that problem, though.

> what shell are you using? set -n is ignored on bash and (this may vary) ksh, and
> rejected on zsh.


I beleive he is using the Bourne shell.

SUSv3 says that an interactive shell may ignore a "set -n" so a
POSIX shell may also behave like that though as you point out,
except for ash based shells, there doesn't seem to be any that
does (someone must have run into the problem and decided to fix
it).

--
Stéphane
  Réponse avec citation
Vieux 02/11/2006, 21h55   #4
Sashi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole


Stephane CHAZELAS wrote:
> 2006-11-2, 21:32(+00), Jordan Abel:
> > 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>,
> > Sashi wrote:
> >> I ran 'set -n' at the prompt and now it refuses to execute my commands!
> >>
> >> Solaris 5.8.
> >>
> >> Er, how do I get out? I put a couple of jobs in the background and
> >> would prefer to bring ths terminal back to life rather than simply kill
> >> it.

> >
> > send an eof. or several.

>
> That will terminate the shell though. There may not be any
> better solution to that problem, though.
>
> > what shell are you using? set -n is ignored on bash and (this may vary)ksh, and
> > rejected on zsh.

>
> I beleive he is using the Bourne shell.
>
> SUSv3 says that an interactive shell may ignore a "set -n" so a
> POSIX shell may also behave like that though as you point out,
> except for ash based shells, there doesn't seem to be any that
> does (someone must have run into the problem and decided to fix
> it).
>
> --
> Stéphane



Sorry, here you go.

$bash -version
GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
Copyright 1998 Free Software Foundation, Inc.

The man page for set specifically says that the -n option is ignored
for interactive shells (and it's easy to see why).

Thanks,
Sashi

  Réponse avec citation
Vieux 02/11/2006, 23h21   #5
Jordan Abel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole

2006-11-02 <1162504522.926549.113360@k70g2000cwa.googlegroups .com>,
Sashi wrote:
>
> Stephane CHAZELAS wrote:
>> 2006-11-2, 21:32(+00), Jordan Abel:
>> > 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>,
>> > Sashi wrote:
>> >> I ran 'set -n' at the prompt and now it refuses to execute my commands!
>> >>
>> >> Solaris 5.8.
>> >>
>> >> Er, how do I get out? I put a couple of jobs in the background and
>> >> would prefer to bring ths terminal back to life rather than simply kill
>> >> it.
>> >
>> > send an eof. or several.

>>
>> That will terminate the shell though. There may not be any
>> better solution to that problem, though.
>>
>> > what shell are you using? set -n is ignored on bash and (this may vary) ksh, and
>> > rejected on zsh.

>>
>> I beleive he is using the Bourne shell.
>>
>> SUSv3 says that an interactive shell may ignore a "set -n" so a
>> POSIX shell may also behave like that though as you point out,
>> except for ash based shells, there doesn't seem to be any that
>> does (someone must have run into the problem and decided to fix
>> it).
>>
>> --
>> Stéphane

>
>
> Sorry, here you go.
>
> $bash -version
> GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
> Copyright 1998 Free Software Foundation, Inc.
>
> The man page for set specifically says that the -n option is ignored
> for interactive shells (and it's easy to see why).


So evidently that's not what you're using, or it would have been ignored
and you'd never have posted this thread.
  Réponse avec citation
Vieux 03/11/2006, 18h24   #6
W.G.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole


Sashi wrote:
> I ran 'set -n' at the prompt and now it refuses to execute my commands!
>
> Solaris 5.8.
>
> Er, how do I get out? I put a couple of jobs in the background and
> would prefer to bring ths terminal back to life rather than simply kill
> it.
>
> Thanks,
> Sashi


dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash

  Réponse avec citation
Vieux 03/11/2006, 20h38   #7
Kenny McCormack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole

In article <1162578245.095731.88870@h54g2000cwb.googlegroups. com>,
W.G. <leopardie333@yahoo.com> wrote:
>
>Sashi wrote:
>> I ran 'set -n' at the prompt and now it refuses to execute my commands!
>>
>> Solaris 5.8.
>>
>> Er, how do I get out? I put a couple of jobs in the background and
>> would prefer to bring ths terminal back to life rather than simply kill
>> it.
>>
>> Thanks,
>> Sashi

>
>dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash


Interesting.

Which platform(s) have "dbx"? (Couldn't find it on either Linux or Solaris)

  Réponse avec citation
Vieux 03/11/2006, 20h58   #8
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dug myself into a silly hole

2006-11-3, 20:38(+00), Kenny McCormack:
[...]
>>dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash

>
> Interesting.
>
> Which platform(s) have "dbx"? (Couldn't find it on either Linux or Solaris)


And, as said, bash will ignore "set -n" when interactive.

If it is the Bourne shell (/bin/sh) on Solaris, then the
equivalent, that seems to work would be:

printf 'attach <pid>\nset flags = flags & ~1\ndetach\n' | gdb /bin/sh

Where <pid> is to be replaced with the pid of sh.

--
Stéphane
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h41.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19452 seconds with 16 queries