Bug 9067 - make: don't crash if ttyname fails
Summary: make: don't crash if ttyname fails
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.1 M4
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard: Need info to backport to Jethro - By ...
Depends on:
Blocks:
 
Reported: 2016-02-05 11:02 UTC by Alexander Larsson
Modified: 2016-03-15 22:55 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Larsson 2016-02-05 11:02:16 UTC
In some cases ttyname can return NULL, which makes make crash. The typical example of this is when you're in a chroot or container, and the app tty is not available in /proc/pts/*. 

This was fixed upstream by:
http://git.savannah.gnu.org/cgit/make.git/commit/?id=292da6f6867b75a5af7ddbb639a1feae022f438f

but there is no release with this in yet.
Comment 1 Rebecca Chang 2016-03-08 05:47:01 UTC
I would like to submit the patch generated from:
http://git.savannah.gnu.org/cgit/make.git/commit/?id=292da6f6867b75a5af7ddbb639a1feae022f438f

to OE-Core master and backport it to Jethro as bug fix.

My implementation in make_4.1.bb would be like this:
SRC_URI += "file://0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch"

Any objections/comment before I send my implementation to OE-Core?
Comment 2 Rebecca Chang 2016-03-10 04:04:25 UTC
Implementation submitted to OE-Core.
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/118753.html
Comment 3 Rebecca Chang 2016-03-14 06:00:03 UTC
Patch has been merged into OE-Core master branch.
http://git.openembedded.org/openembedded-core/commit/?id=0fe2a4b428b1b9a937914d87ec089b5a64f641eb

What is procedure to get it backport to Jethro? I have used [master][jethro] tag at the Subject when I submit the patch. But it is not merge into jethro.
Comment 4 Ross Burton 2016-03-15 20:57:06 UTC
Marking as resolved as this is fixed in oe-core 0fe2a4b428b1b9a937914d87ec089b5a64f641eb.

If you want to get this in jethro then submit the patch against origin/jethro to the oe-core list with the [jethro] tag in the subject.
Comment 5 Rebecca Chang 2016-03-15 22:55:34 UTC
Thanks. Robert has staged this patch in his branch for jethro update.