Bug 9067

Summary: make: don't crash if ttyname fails
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Alexander Larsson <alexl>
Component: devtools / tool chainAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: anuj.mittal, mei.yeen.ng, meta.mr.watcher, meta.watcher, rebecca.swee.fun.chang, ross.burton
Version: unspecified   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: Need info to backport to Jethro - By Rebecca
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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.