Opened 13 years ago

Closed 12 years ago

#928 closed bug (fixed)

'which' aborts or kills terminal

Reported by: engima Owned by: bonefish
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/pre-alpha1
Keywords: Cc: bonefish
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by wkornewald)

When running the shell command 'which' it will always result in either:

If the command we're trying to find doesn't exit, an error message that some gibberish has been terminated, and also kills the terminal (Attaching screenshot) If the command exists, we just get the terminal closed immediately.

The command 'which' uses, causing the fault is 'echo $(builtin type $cmd | sed lq)'. Typing this out on the command line results in the same problem.

Attachments (1)

which.png (24.1 KB) - added by engima 13 years ago.
Screenshot of error message from 'which asdf'

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by engima

Attachment: which.png added

Screenshot of error message from 'which asdf'

comment:1 Changed 13 years ago by jackburton

Owner: changed from jackburton to axeld

I don't know why this was assigned to me, anyway, could be either a problem with the tty layer or with pipes, and in both cases, Axel would know better :)

comment:2 Changed 13 years ago by wkornewald

Description: modified (diff)

Who is responsible for the Terminal? Currently, the component owner is "jackburton". That's why it got assigned to you.

comment:3 Changed 13 years ago by axeld

I've took it over now.

comment:4 Changed 12 years ago by jackburton

Typing just echo $($cmd) results in the same problem.

comment:5 Changed 12 years ago by jackburton

MiniTerminal is also affected, although:

'which' results in: whence: argument expected

while

'which ls' results in: sh: src/system/libroot/posix/malloc/processheap.cpp:166:void BPrivate::processHeap::free(void *): sb

and a crash.

comment:6 Changed 12 years ago by bonefish

Cc: bonefish added

Just for reference, this bug might be a symptom of the bug(s) underlying #113 and/or #627.

comment:7 Changed 12 years ago by bonefish

Owner: changed from axeld to bonefish

comment:8 Changed 12 years ago by bonefish

Resolution: fixed
Status: newclosed

Fixed in hrev20402.

Note: See TracTickets for help on using tickets.