Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Fix flock -c
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb2060 committed Jul 28, 2021
1 parent 84ce191 commit d755581
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/libbb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2265,12 +2265,12 @@ static ALWAYS_INLINE void* not_const_pp(const void *p) { return (void*)p; }
* use bb_default_login_shell and following defines.
* If you change LIBBB_DEFAULT_LOGIN_SHELL,
* don't forget to change increment constant. */
#define LIBBB_DEFAULT_LOGIN_SHELL "-/sbin/sh"
#define LIBBB_DEFAULT_LOGIN_SHELL "-/system/bin/sh"
extern const char bb_default_login_shell[] ALIGN1;
/* "/bin/sh" */
#define DEFAULT_SHELL (bb_default_login_shell+1)
/* "sh" */
#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+7)
#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+13)

/* The following devices are the same on all systems. */
#define CURRENT_TTY "/dev/tty"
Expand Down
4 changes: 4 additions & 0 deletions libbb/get_shell_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const char* FAST_FUNC get_shell_name(void)
if (shell && shell[0])
return shell;

#ifdef __ANDROID__
return DEFAULT_SHELL_SHORT_NAME;
#endif

pw = getpwuid(getuid());
if (pw && pw->pw_shell && pw->pw_shell[0])
return pw->pw_shell;
Expand Down

1 comment on commit d755581

@mahamadkoye
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.