Opened 10 years ago

Closed 3 years ago

Last modified 17 months ago

#7922 closed bug (invalid)

system() call does not launch aliases

Reported by: oco Owned by: nobody
Priority: normal Milestone:
Component: System/POSIX Version: R1/alpha3
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Aliases defined using the alias command can not be run via a system() call.

In the open office build system (OOo4Kids), a shell script define some aliases. If i understand things correctly, those commands are intended to be launch with a perl script ( that use system(). It does not work under Haiku.

I can workaround the problem with symlinks.

I am not absolutely sure that Haiku should support this. Documents i have found (only a google search) don't describe how system() should work in this case. I don't have a linux box right now to confirm the behavior under Linux. I will do the test next week.

The problem could be reproduced using this c program :

#include <unistd.h>

int main() {

system("ll"); return 0;


ll is an alias for "ls -lA" defined by default under Haiku.

This program shows an error :

/bin/sh: ll: command not found

Change History (5)

comment:1 by pulkomandy, 10 years ago

There's a difference between ll and custom build-time aliases.

ll is defined in some system-wide sh file (something like /etc/profile, not sure where it is on Haiku). It relies on sh importing this file whenever it loads (as system loads it)

User-defined aliases, on the other hand, relies on sh inheriting aliases from the parent shell ? or how are they defined and run ? I don't think this makes sense, as user customizations to their system shell may break the openoffice build...

comment:2 by oco, 10 years ago

My simple test program has the same behavior on my Ubuntu 11.04 as Haiku. There is probably something i have overlook in the OOo4Kids build system. I will ask them how alias commands are supposed to be launched.

comment:3 by luroh, 7 years ago

Milestone: R1Unscheduled

Move POSIX compatibility related tickets out of R1 milestone (FutureHaiku/Features).

comment:4 by korli, 3 years ago

Resolution: invalid
Status: newclosed

same behavior on ubuntu.

comment:5 by nielx, 17 months ago

Milestone: Unscheduled

Remove milestone for tickets with status = closed and resolution != fixed

Note: See TracTickets for help on using tickets.